about summary refs log tree commit diff
path: root/tests/binary-patching.nix
blob: 0de3028bd64d6b101c43c9ed98acb971b5130cd7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ version }:

with import ./config.nix;

mkDerivation {
  name = "foo-${toString version}";
  builder = builtins.toFile "builder.sh"
    ''
      mkdir $out
      seq 1 1000000 > $out/foo
      ${if version != 1 then ''
        seq 1000000 1010000 >> $out/foo
      '' else ""}
      ${if version == 3 then ''
        echo foobar >> $out/foo
      '' else ""}
    '';
}