about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-07-20T11·47+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-07-20T11·47+0000
commit0243eea4b92ca1598353e31b7e3c0d195c903221 (patch)
treea01b92dbba9a5d43c1c62aba8f32058c10e21ea6 /scripts
parentd329c3ea9dde17a665b32a1716d02eb13627826d (diff)
* Create a symlink to /nix/var/nix/manifests in /nix/var/nix/gcroots
  if it doesn't exist.

Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-pull.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in
index d2979721aa..51c7e681a5 100644
--- a/scripts/nix-pull.in
+++ b/scripts/nix-pull.in
@@ -24,6 +24,14 @@ if (! -e $manifestDir) {
 }
 
 
+# Make sure that the manifests directory is scanned for GC roots.
+my $gcRootsDir = "$stateDir/gcroots";
+my $manifestDirLink = "$gcRootsDir/manifests";
+if (! -l $manifestDirLink) {
+    symlink($manifestDir, $manifestDirLink) or die "cannot create symlink `$manifestDirLink'";
+}
+
+
 # Process the URLs specified on the command line.
 my %narFiles;
 my %patches;