about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-08-10T00·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-08-10T00·28+0000
commit911bc01454fba42b531f3f8dd0781845b045be63 (patch)
treece049fdfd0ab1ef8b8d582e11e2c9866e3c7fbb5 /scripts
parent5e52df18fefb188b7c7a8e917ebeb8ea1f5ed95a (diff)
* Enable nix-prefetch-url caching in nix-channel.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-channel.in6
-rw-r--r--scripts/nix-pack-closure.in6
2 files changed, 9 insertions, 3 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index fd6639ec1b31..6a4603976fb9 100644
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -8,6 +8,12 @@ my $stateDir = $ENV{"NIX_STATE_DIR"};
 $stateDir = "@localstatedir@/nix" unless defined $stateDir;
 
 
+# Turn on caching in nix-prefetch-url.
+my $channelCache = "$stateDir/channel-cache";
+$ENV{'NIX_DOWNLOAD_CACHE'} = $channelCache;
+mkdir $channelCache, 0755 unless -e $channelCache;
+
+
 # Figure out the name of the `.nix-channels' file to use.
 my $home = $ENV{"HOME"};
 die '$HOME not set' unless defined $home;
diff --git a/scripts/nix-pack-closure.in b/scripts/nix-pack-closure.in
index 8d9ecf126200..0634537d0a57 100644
--- a/scripts/nix-pack-closure.in
+++ b/scripts/nix-pack-closure.in
@@ -17,9 +17,9 @@ $binDir = "@bindir@" unless defined $binDir;
 my $tmpDir = tempdir("nix-pack-closure.XXXXXX", CLEANUP => 1, TMPDIR => 1)
     or die "cannot create a temporary directory";
 
-mkdir "$tmpDir/contents", 0777 or die;
-mkdir "$tmpDir/references", 0777 or die;
-mkdir "$tmpDir/derivers", 0777 or die;
+mkdir "$tmpDir/contents", 0755 or die;
+mkdir "$tmpDir/references", 0755 or die;
+mkdir "$tmpDir/derivers", 0755 or die;
 
 open TOPLEVEL, ">$tmpDir/top-level" or die;