mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
7974aae81c
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 ... "; ... }
23 lines
330 B
Nix
23 lines
330 B
Nix
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@";
|
|
};
|
|
|
|
}
|