Topsort mix dependencies