diff options
Diffstat (limited to 'scripts/nix-install-package.in')
-rw-r--r-- | scripts/nix-install-package.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/nix-install-package.in b/scripts/nix-install-package.in index 3aaed7e59fc4..e37911e33438 100644 --- a/scripts/nix-install-package.in +++ b/scripts/nix-install-package.in @@ -3,6 +3,8 @@ use strict; use File::Temp qw(tempdir); +my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@"; + sub usageError { print STDERR <<EOF; @@ -59,7 +61,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", "$binDir/nix-install-package", @ARGV); } die "cannot execute `xterm'"; } @@ -122,12 +124,12 @@ if ($interactive) { print "\nPulling manifests...\n"; -system("@bindir@/nix-pull", $manifestURL) == 0 +system("$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("$binDir/nix-env", "--install", $outPath, "--force-name", $drvName, @extraNixEnvArgs) == 0 or barf "nix-env failed: $?"; |