mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
18 lines
443 B
Nix
18 lines
443 B
Nix
{ version }:
|
|
|
|
with import ./config.nix;
|
|
|
|
mkDerivation {
|
|
name = "foo-${toString version}";
|
|
builder = builtins.toFile "builder.sh"
|
|
''
|
|
mkdir $out
|
|
(for ((n = 1; n < 100000; n++)); do echo $n; done) > $out/foo
|
|
${if version != 1 then ''
|
|
(for ((n = 100000; n < 110000; n++)); do echo $n; done) >> $out/foo
|
|
'' else ""}
|
|
${if version == 3 then ''
|
|
echo foobar >> $out/foo
|
|
'' else ""}
|
|
'';
|
|
}
|