aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorShell Turner <cam.turn@gmail.com>2014-09-16 18:05:00 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-23 15:11:24 +0200
commit9dd54bc7bbc404e8e4513b712e0af9ac5b4439bd (patch)
tree0b677005294c26471d1f05f5de38f215b1b6ab9a /scripts
parenta5b5ebc45fa770f88a4e375fd2b4ebd36a4e4cbe (diff)
Pass through --set from nix-install-package command line to nix-env
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-install-package.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/nix-install-package.in b/scripts/nix-install-package.in
index 23f6efbcd..c109652d1 100755
--- a/scripts/nix-install-package.in
+++ b/scripts/nix-install-package.in
@@ -15,6 +15,7 @@ my $source;
my $fromURL = 0;
my @extraNixEnvArgs = ();
my $interactive = 1;
+my $op = "--install";
while (scalar @args) {
my $arg = shift @args;
@@ -29,6 +30,9 @@ while (scalar @args) {
die "$0: ‘--profile’ requires an argument\n" if !defined $profile;
push @extraNixEnvArgs, "-p", $profile;
}
+ elsif ($arg eq "--set") {
+ $op = "--set";
+ }
elsif ($arg eq "--non-interactive") {
$interactive = 0;
}
@@ -129,7 +133,7 @@ if (defined $binaryCacheURL) {
print "\nInstalling package...\n";
-system("$Nix::Config::binDir/nix-env", "--install", $outPath, "--force-name", $drvName, @extraNixEnvArgs) == 0
+system("$Nix::Config::binDir/nix-env", $op, $outPath, "--force-name", $drvName, @extraNixEnvArgs) == 0
or barf "nix-env failed: $?";