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,6 +1,6 @@
all-local: config.nix all-local: config.nix
files = nar.nix buildenv.nix buildenv.pl unpack-channel.nix unpack-channel.sh derivation.nix fetchurl.nix \ files = nar.nix buildenv.nix buildenv.pl unpack-channel.nix derivation.nix fetchurl.nix \
imported-drv-to-derivation.nix imported-drv-to-derivation.nix
install-exec-local: install-exec-local:

View file

@ -1,12 +1,25 @@
with import <nix/config.nix>; 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 }: { name, channelName, src }:
derivation { derivation {
system = builtins.currentSystem; system = builtins.currentSystem;
builder = shell; builder = shell;
args = [ "-e" ./unpack-channel.sh ]; args = [ "-e" builder ];
inherit name channelName src bzip2 tar tr; inherit name channelName src;
PATH = "${nixBinDir}:${coreutils}"; PATH = "${nixBinDir}:${coreutils}";
# No point in doing this remotely. # No point in doing this remotely.

View file

@ -1,4 +0,0 @@
mkdir $out
cd $out
$bzip2 -d < $src | $tar xf -
mv * $out/$channelName