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

Merge pull request #14312 from corngood/develop-structuredAttrs-fix

tests/functional/flakes/develop.sh: Add test for outputChecks stripping
This commit is contained in:
John Ericson 2025-10-20 22:48:39 +00:00 committed by GitHub
commit 2a2bb8330d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,21 @@ cat <<EOF >"$TEST_HOME/flake.nix"
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
meta.outputsToInstall = [ "out" ]; meta.outputsToInstall = [ "out" ];
buildCommand = ""; 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 EOF
)" -ef "$BASH_INTERACTIVE_EXECUTABLE" ]] )" -ef "$BASH_INTERACTIVE_EXECUTABLE" ]]
# Test whether `nix develop` works with `__structuredAttrs`
[[ -z "$(nix develop --no-write-lock-file .#hello-structured </dev/null)" ]]
clearStore clearStore