diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-02-27T14·06+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-02-27T14·06+0000 |
commit | 1273d355ac91f502654aba0df07068d330064e83 (patch) | |
tree | cdd5c9bdc5c2f5aa4dc562eafe0edac8f6824fe5 /scripts/nix-pull.in | |
parent | d4ca5c395290da9a517df99dfbb79d2186930c83 (diff) |
* nix-install-package: don't pollute /nix/var/nix/manifests.
Diffstat (limited to 'scripts/nix-pull.in')
-rw-r--r-- | scripts/nix-pull.in | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index ac2e3e3ed027..856ee80fa9c8 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -8,15 +8,10 @@ my $tmpDir = tempdir("nix-pull.XXXXXX", CLEANUP => 1, TMPDIR => 1) or die "cannot create a temporary directory"; my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@"; - -my $libexecDir = $ENV{"NIX_LIBEXEC_DIR"}; -$libexecDir = "@libexecdir@" unless defined $libexecDir; - -my $stateDir = $ENV{"NIX_STATE_DIR"}; -$stateDir = "@localstatedir@/nix" unless defined $stateDir; - -my $storeDir = $ENV{"NIX_STORE_DIR"}; -$storeDir = "@storedir@" unless defined $storeDir; +my $libexecDir = ($ENV{"NIX_LIBEXEC_DIR"} or "@libexecdir@"); +my $storeDir = ($ENV{"NIX_STORE_DIR"} or "@storedir@"); +my $stateDir = ($ENV{"NIX_STATE_DIR"} or "@localstatedir@/nix"); +my $manifestDir = ($ENV{"NIX_MANIFESTS_DIR"} or "$stateDir/manifests"); # Prevent access problems in shared-stored installations. @@ -92,7 +87,7 @@ sub processURL { or die "cannot hash `$manifest'"; chomp $hash; - my $finalPath = "$stateDir/manifests/$baseName-$hash.nixmanifest"; + my $finalPath = "$manifestDir/$baseName-$hash.nixmanifest"; system("@coreutils@/ln", "-sfn", "$manifest", "$finalPath") == 0 or die "cannot link `$finalPath to `$manifest'"; |