diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2012-01-03T00·47+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2012-01-03T00·47+0000 |
commit | dadbb51d969517c1f2512015ab201dc99088d9a6 (patch) | |
tree | b6bfb335b1049f215cb466895c1910891efdb8bc /scripts/nix-build.in | |
parent | 48cea0d01ef48733ab38a73a20611f63aeb1b5cc (diff) |
* Use Nix::Config.
Diffstat (limited to 'scripts/nix-build.in')
-rwxr-xr-x | scripts/nix-build.in | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in index d9d1da73b12f..68c24b75d440 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -1,8 +1,7 @@ #! @perl@ -w -I@libexecdir@/nix use strict; - -my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@"; +use Nix::Config; my $addDrvLink = 0; @@ -156,7 +155,7 @@ foreach my $expr (@exprs) { # Instantiate. my @drvPaths; # !!! would prefer the perl 5.8.0 pipe open feature here. - my $pid = open(DRVPATHS, "-|") || exec "$binDir/nix-instantiate", "--add-root", $drvLink, "--indirect", @instArgs, $expr; + my $pid = open(DRVPATHS, "-|") || exec "$Nix::Config::binDir/nix-instantiate", "--add-root", $drvLink, "--indirect", @instArgs, $expr; while (<DRVPATHS>) {chomp; push @drvPaths, $_;} if (!close DRVPATHS) { die "nix-instantiate killed by signal " . ($? & 127) . "\n" if ($? & 127); @@ -170,7 +169,7 @@ foreach my $expr (@exprs) { # Build. my @outPaths; - $pid = open(OUTPATHS, "-|") || exec "$binDir/nix-store", "--add-root", $outLink, "--indirect", "-r", + $pid = open(OUTPATHS, "-|") || exec "$Nix::Config::binDir/nix-store", "--add-root", $outLink, "--indirect", "-r", @buildArgs, @drvPaths; while (<OUTPATHS>) {chomp; push @outPaths, $_;} if (!close OUTPATHS) { |