Due to a typo in quoteRegexChars, finding runtime garbage collection roots was failing on paths that contained a dot, or any other regex chars that would have to be replaced. When fixing that error, also add tests to make sure gc continues to work.
30 lines
593 B
Nix
30 lines
593 B
Nix
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
|
|
'';
|
|
};
|
|
}
|