Skip to content

Commit

Permalink
Use 'nix dump-path'
Browse files Browse the repository at this point in the history
This makes nix-serve work properly with redirected stores,
e.g. 'NIX_REMOTE=/my/nix nix-serve'.
  • Loading branch information
edolstra committed Nov 24, 2020
1 parent 6baa779 commit 4adb63d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nix-serve.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ my $app = sub {
my $storePath = queryPathFromHashPart($hashPart);
return [404, ['Content-Type' => 'text/plain'], ["No such path.\n"]] unless $storePath;
my $fh = new IO::Handle;
open $fh, "-|", "nix-store", "--dump", "--", $storePath;
open $fh, "-|", "nix", "dump-path", "--", $storePath;
return [200, ['Content-Type' => 'text/plain'], $fh];
}

Expand Down

0 comments on commit 4adb63d

Please sign in to comment.