diff options
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 0196c2fc1873..048f5c603008 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -992,7 +992,9 @@ static void opServe(Strings opFlags, Strings opArgs) } case cmdExportPaths: { - exportPaths(*store, readStorePaths<Paths>(in), false, out); + Paths sorted = topoSortPaths(*store, readStorePaths<PathSet>(in)); + reverse(sorted.begin(), sorted.end()); + exportPaths(*store, sorted, false, out); break; } |