about summary refs log tree commit diff
path: root/corepkgs/unpack-channel.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01T20·34-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01T20·34-0400
commitafa7e0187815d89c8af93fa9c1081bf67ab0f10e (patch)
treed4b6495e06724ff6c8f96f5de02df2087bbcfb31 /corepkgs/unpack-channel.nix
parent8a25d787d7f05d612521bd489510aa23d4ef2177 (diff)
Inline unpack-channel.sh
Diffstat (limited to 'corepkgs/unpack-channel.nix')
-rw-r--r--corepkgs/unpack-channel.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/corepkgs/unpack-channel.nix b/corepkgs/unpack-channel.nix
index 245430ab0feb..b26bece30eae 100644
--- a/corepkgs/unpack-channel.nix
+++ b/corepkgs/unpack-channel.nix
@@ -1,14 +1,27 @@
 with import <nix/config.nix>;
 
+let
+
+  builder = builtins.toFile "unpack-channel.sh"
+    ''
+      mkdir $out
+      cd $out
+      ${bzip2} -d < $src | ${tar} xf -
+      mv * $out/$channelName
+    '';
+
+in
+
 { name, channelName, src }:
 
 derivation {
   system = builtins.currentSystem;
   builder = shell;
-  args = [ "-e" ./unpack-channel.sh ];
-  inherit name channelName src bzip2 tar tr;
+  args = [ "-e" builder ];
+  inherit name channelName src;
+
   PATH = "${nixBinDir}:${coreutils}";
-  
+
   # No point in doing this remotely.
   preferLocalBuild = true;