aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/gc-runtime.nix
blob: 4303e08806bb3032203d1f2c337dc74699e40c8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
with import ./config.nix;

{
  environ = mkDerivation {
    name = "gc-runtime-environ";
    buildCommand = "mkdir $out; echo environ > $out/environ";
  };

  open = mkDerivation {
    name = "gc-runtime-open";
    buildCommand = "mkdir $out; echo open > $out/open";
  };

  program = mkDerivation {
    name = "gc-runtime-program";
    builder =
      # Test inline source file definitions.
      builtins.toFile "builder.sh" ''
        mkdir $out

        cat > $out/program <<EOF
        #! ${shell}
        sleep 10000 < \$1
        EOF

        chmod +x $out/program
      '';
  };
}