1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 04:43:53 +02:00
This commit is contained in:
Eelco Dolstra 2008-11-20 15:44:59 +00:00
parent eb86b6f5a5
commit 4213b8d8ec
9 changed files with 31 additions and 21 deletions

View file

@ -4,6 +4,9 @@ use strict;
use File::Basename;
use IO::Handle;
my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@";
STDOUT->autoflush(1);
my @remoteStoresAll = split ':', ($ENV{"NIX_OTHER_STORES"} or "");
@ -87,7 +90,7 @@ elsif ($ARGV[0] eq "--substitute") {
(my $infoFile, my $sourcePath) = findStorePath $storePath;
die unless $infoFile;
print "\n*** Copying `$storePath' from `$sourcePath'\n\n";
system("@bindir@/nix-store --dump $sourcePath | @bindir@/nix-store --restore $storePath") == 0
system("$binDir/nix-store --dump $sourcePath | $binDir/nix-store --restore $storePath") == 0
or die "cannot copy `$sourcePath' to `$storePath'";
}