Inline unpack-channel.sh

This commit is contained in:
Eelco Dolstra 2012-08-01 16:34:17 -04:00
parent 8a25d787d7
commit afa7e01878
3 changed files with 17 additions and 8 deletions

View file

@ -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;