about summary refs log tree commit diff
path: root/scripts/nix-install-package.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-install-package.in')
-rw-r--r--scripts/nix-install-package.in9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/nix-install-package.in b/scripts/nix-install-package.in
index f40cfc7d0b23..178b14c7468f 100644
--- a/scripts/nix-install-package.in
+++ b/scripts/nix-install-package.in
@@ -2,8 +2,7 @@
 
 use strict;
 use File::Temp qw(tempdir);
-
-my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@";
+use Nix::Config;
 
 
 sub usageError {
@@ -61,7 +60,7 @@ if ($interactive && !defined $ENV{"NIX_HAVE_TERMINAL"}) {
     $ENV{"NIX_HAVE_TERMINAL"} = "1";
     $ENV{"LD_LIBRARY_PATH"} = "";
     foreach my $term ("xterm", "konsole", "gnome-terminal", "xterm") {
-        exec($term, "-e", "$binDir/nix-install-package", @ARGV);
+        exec($term, "-e", "$Nix::Config::binDir/nix-install-package", @ARGV);
     }
     die "cannot execute `xterm'";
 }
@@ -132,12 +131,12 @@ $ENV{NIX_REMOTE} = "";
 
 
 print "\nPulling manifests...\n";
-system("$binDir/nix-pull", $manifestURL) == 0
+system("$Nix::Config::binDir/nix-pull", $manifestURL) == 0
     or barf "nix-pull failed: $?";
 
 
 print "\nInstalling package...\n";
-system("$binDir/nix-env", "--install", $outPath, "--force-name", $drvName, @extraNixEnvArgs) == 0
+system("$Nix::Config::binDir/nix-env", "--install", $outPath, "--force-name", $drvName, @extraNixEnvArgs) == 0
     or barf "nix-env failed: $?";