2010-11-17 15:30:07 +00:00
|
|
|
{ version }:
|
|
|
|
|
|
|
|
with import ./config.nix;
|
|
|
|
|
|
|
|
mkDerivation {
|
|
|
|
name = "foo-${toString version}";
|
|
|
|
builder = builtins.toFile "builder.sh"
|
|
|
|
''
|
|
|
|
mkdir $out
|
2011-02-09 14:03:16 +00:00
|
|
|
(for ((n = 1; n < 100000; n++)); do echo $n; done) > $out/foo
|
2010-11-17 18:01:37 +00:00
|
|
|
${if version != 1 then ''
|
2011-02-09 14:03:16 +00:00
|
|
|
(for ((n = 100000; n < 110000; n++)); do echo $n; done) >> $out/foo
|
2010-11-17 15:30:07 +00:00
|
|
|
'' else ""}
|
2010-11-17 18:01:37 +00:00
|
|
|
${if version == 3 then ''
|
|
|
|
echo foobar >> $out/foo
|
|
|
|
'' else ""}
|
2010-11-17 15:30:07 +00:00
|
|
|
'';
|
|
|
|
}
|