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:
parent
0f28c76a44
commit
645794b458
1 changed files with 18 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue