1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

* Enable nix-prefetch-url caching in nix-channel.

This commit is contained in:
Eelco Dolstra 2007-08-10 00:28:44 +00:00
parent 5e52df18fe
commit 911bc01454
2 changed files with 9 additions and 3 deletions

View file

@ -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;