2012-01-03 03:51:38 +02:00
|
|
|
with import <nix/config.nix>;
|
|
|
|
|
2012-08-01 23:34:17 +03:00
|
|
|
let
|
|
|
|
|
|
|
|
builder = builtins.toFile "unpack-channel.sh"
|
|
|
|
''
|
|
|
|
mkdir $out
|
|
|
|
cd $out
|
2012-08-01 23:42:51 +03:00
|
|
|
${bzip2} -d < $src | ${tar} xf - --warning=no-timestamp
|
2012-08-01 23:34:17 +03:00
|
|
|
mv * $out/$channelName
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2012-04-14 22:05:28 +03:00
|
|
|
{ name, channelName, src }:
|
2012-01-03 03:51:38 +02:00
|
|
|
|
|
|
|
derivation {
|
2012-04-14 19:38:52 +03:00
|
|
|
system = builtins.currentSystem;
|
2012-01-03 03:51:38 +02:00
|
|
|
builder = shell;
|
2012-08-01 23:34:17 +03:00
|
|
|
args = [ "-e" builder ];
|
|
|
|
inherit name channelName src;
|
|
|
|
|
2012-01-03 03:51:38 +02:00
|
|
|
PATH = "${nixBinDir}:${coreutils}";
|
2012-08-01 23:34:17 +03:00
|
|
|
|
2012-04-26 17:52:08 +03:00
|
|
|
# No point in doing this remotely.
|
|
|
|
preferLocalBuild = true;
|
2012-05-10 05:14:36 +03:00
|
|
|
|
|
|
|
# Don't build in a chroot because Nix's dependencies may not be there.
|
|
|
|
__noChroot = true;
|
2012-01-03 03:51:38 +02:00
|
|
|
}
|