about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-02-27T11·01+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-02-27T11·01+0000
commit8ab6bc5a49686aedf85adffe322c4f016764af5f (patch)
treeef471fc5e6e0e63524ee19595a1a3e196524ce2e
parentf052c10eedf8701e746bbacac63a8ac0d4a8bc0f (diff)
* nix-channel: use nix-build.
-rw-r--r--scripts/nix-channel.in14
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index c023a75398..8faee0b0e5 100644
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -125,15 +125,13 @@ sub update {
 
     my $rootFile = "$rootsDir/per-user/$userName/channels";
     
-    # Instantiate the Nix expression.
+    # Build the Nix expression.
     print "unpacking channel Nix expressions...\n";
-    my $storeExpr = `@bindir@/nix-instantiate --add-root '$rootFile'.tmp @datadir@/nix/corepkgs/channels/unpack.nix --argstr system @system@ --arg inputs '$inputs'`
-        or die "cannot instantiate Nix expression";
-    chomp $storeExpr;
-
-    # Build the resulting derivation.
-    my $outPath = `@bindir@/nix-store --add-root '$rootFile' -r '$storeExpr'`
-        or die "cannot realise store expression";
+    my $outPath = `\\
+        @bindir@/nix-build --out-link '$rootFile' --drv-link '$rootFile'.tmp \\
+        @datadir@/nix/corepkgs/channels/unpack.nix \\
+        --argstr system @system@ --arg inputs '$inputs'`
+        or die "cannot unpack the channels";
     chomp $outPath;
 
     unlink "$rootFile.tmp";