about summary refs log tree commit diff
path: root/scripts/nix-channel.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-04-07T14·35+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-04-07T14·35+0000
commit7d876f8fa7b6c3ce120a66b59f69b70ae526538b (patch)
tree575968bbd3fd64b694b06dcb1f6e05aa80dea815 /scripts/nix-channel.in
parent10c429c757625c4c36319751f6d87b8990677c1f (diff)
* Get rid of fetchurl, we don't need it anymore.
Diffstat (limited to 'scripts/nix-channel.in')
-rw-r--r--scripts/nix-channel.in16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 84fa72e359..42e715605d 100644
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -81,17 +81,14 @@ sub update {
     # expressions.
 
     my $nixExpr = "[";
-    
     foreach my $url (@channels) {
         my $fullURL = "$url/nixexprs.tar.bz2";
-        my $hash = `@bindir@/nix-prefetch-url '$fullURL' 2> /dev/null`
-            or die "cannot fetch `$fullURL'";
-        chomp $hash;
-        # !!! escaping
-        $nixExpr .= "((import @datadir@/nix/corepkgs/fetchurl) " .
-            "{url = $fullURL; md5 = \"$hash\"; system = \"@system@\";}) "
+        $ENV{"PRINT_PATH"} = 1;
+        my ($hash, $path) = `@bindir@/nix-prefetch-url '$fullURL' 2> /dev/null`;
+        die "cannot fetch `$fullURL'" if $? != 0;
+        chomp $path;
+        $nixExpr .= $path . " ";
     }
-
     $nixExpr .= "]";
 
     $nixExpr =
@@ -134,6 +131,9 @@ EOF
 }
 
 
+usageError if scalar @ARGV == 0;
+
+
 while (scalar @ARGV) {
     my $arg = shift @ARGV;