Pass through --set from nix-install-package command line to nix-env
This commit is contained in:
parent
a5b5ebc45f
commit
9dd54bc7bb
1 changed files with 5 additions and 1 deletions
|
@ -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: $?";
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue