about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/prebuilts.conf4
-rw-r--r--scripts/readmanifest.pm.in18
2 files changed, 11 insertions, 11 deletions
diff --git a/scripts/prebuilts.conf b/scripts/prebuilts.conf
index c7bc89c61c05..394436538c71 100644
--- a/scripts/prebuilts.conf
+++ b/scripts/prebuilts.conf
@@ -1,2 +1,2 @@
-# A list of URLs from where we obtain Nix archives.
-http://losser.st-lab.cs.uu.nl/~eelco/nix-dist/
+# A list of URLs from where `nix-pull' obtain Nix archives if
+# no URL is specified on the command line.
diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in
index e8819d8b81ea..2c6223807d0c 100644
--- a/scripts/readmanifest.pm.in
+++ b/scripts/readmanifest.pm.in
@@ -10,15 +10,16 @@ sub processURL {
     $url =~ s/\/$//;
     print "obtaining list of Nix archives at $url...\n";
 
-    system "wget --cache=off '$url'/MANIFEST -O '$manifest' 2> /dev/null"; # !!! escape
-    if ($?) { die "`wget' failed"; }
+    system("curl --fail --silent --show-error " .
+           "'$url/MANIFEST' > '$manifest' 2> /dev/null") == 0
+           or die "curl failed: $?";
         
     open MANIFEST, "<$manifest";
 
     my $inside = 0;
 
     my $storepath;
-    my $narname;
+    my $narurl;
     my $hash;
     my @preds;
 
@@ -31,7 +32,7 @@ sub processURL {
             if (/^\{$/) { 
                 $inside = 1;
                 undef $storepath;
-                undef $narname;
+                undef $narurl;
                 undef $hash;
                 @preds = ();
 	    }
@@ -39,10 +40,9 @@ sub processURL {
         } else {
             if (/^\}$/) {
                 $inside = 0;
-                my $fullurl = "$url/$narname";
 
-		$$storepaths2urls{$storepath} = $fullurl;
-		$$urls2hashes{$fullurl} = $hash;
+		$$storepaths2urls{$storepath} = $narurl;
+		$$urls2hashes{$narurl} = $hash;
 
                 foreach my $p (@preds) {
 		    $$successors{$p} = $storepath;
@@ -52,8 +52,8 @@ sub processURL {
             elsif (/^\s*StorePath:\s*(\/\S+)\s*$/) {
                 $storepath = $1;
             }
-            elsif (/^\s*NarName:\s*(\S+)\s*$/) {
-                $narname = $1;
+            elsif (/^\s*NarURL:\s*(\S+)\s*$/) {
+                $narurl = $1;
 	    }
             elsif (/^\s*MD5:\s*(\S+)\s*$/) {
                 $hash = $1;