diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-01T12·07+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-01T12·07+0000 |
commit | 7974aae81ced67b2aee0b537a37d813f6c67a1ec (patch) | |
tree | a3b48ffca70701f967d43e1e25d3cf6772754311 /tests | |
parent | de90fdf908f2504e1a89a5d4660552cbcc1a15d5 (diff) |
* New primop: builtins.toFile, which writes a string into the store
and returns its path. This can be used to (for instance) write builders inside a Nix expression, e.g., stdenv.mkDerivation { builder = " source $stdenv/setup ... "; ... }
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gc-runtime.nix.in | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/tests/gc-runtime.nix.in b/tests/gc-runtime.nix.in index aefffa276623..4ffe0435aa4d 100644 --- a/tests/gc-runtime.nix.in +++ b/tests/gc-runtime.nix.in @@ -1,7 +1,23 @@ -derivation { - name = "gc-runtime"; - system = "@system@"; - builder = "@shell@"; - args = ["-e" "-x" ./gc-runtime.builder.sh]; - PATH = "@testPath@"; +let { + + # Test inline source file definitions. + builder = builtins.toFile " +mkdir $out + +cat > $out/program <<EOF +#! $SHELL +sleep 10000 +EOF + +chmod +x $out/program +"; + + body = derivation { + name = "gc-runtime"; + system = "@system@"; + builder = "@shell@"; + args = ["-e" "-x" builder]; + PATH = "@testPath@"; + }; + } |