Inline unpack-channel.sh
This commit is contained in:
parent
8a25d787d7
commit
afa7e01878
|
@ -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:
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
mkdir $out
|
|
||||||
cd $out
|
|
||||||
$bzip2 -d < $src | $tar xf -
|
|
||||||
mv * $out/$channelName
|
|
Loading…
Reference in a new issue