1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

tests/functional/flakes/develop.sh: Add test for outputChecks stripping

This commit is contained in:
David McFarland 2025-10-20 19:16:19 -03:00
parent 0f28c76a44
commit 645794b458

View file

@ -18,6 +18,21 @@ cat <<EOF >"$TEST_HOME/flake.nix"
outputs = [ "out" "dev" ];
meta.outputsToInstall = [ "out" ];
buildCommand = "";
# ensure we're stripping these from the environment derivation
disallowedReferences = [ "out" ];
disallowedRequisites = [ "out" ];
};
packages.$system.hello-structured = (import ./config.nix).mkDerivation {
__structuredAttrs = true;
name = "hello";
outputs = [ "out" "dev" ];
meta.outputsToInstall = [ "out" ];
buildCommand = "";
# ensure we're stripping these from the environment derivation
outputChecks.out = {
disallowedReferences = [ "out" ];
disallowedRequisites = [ "out" ];
};
};
};
}
@ -142,4 +157,7 @@ echo "\$SHELL"
EOF
)" -ef "$BASH_INTERACTIVE_EXECUTABLE" ]]
# Test whether `nix develop` works with `__structuredAttrs`
[[ -z "$(nix develop --no-write-lock-file .#hello-structured </dev/null)" ]]
clearStore