Skip to content

Commit 645794b

Browse files
committed
tests/functional/flakes/develop.sh: Add test for outputChecks stripping
1 parent 0f28c76 commit 645794b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/functional/flakes/develop.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ cat <<EOF >"$TEST_HOME/flake.nix"
1818
outputs = [ "out" "dev" ];
1919
meta.outputsToInstall = [ "out" ];
2020
buildCommand = "";
21+
# ensure we're stripping these from the environment derivation
22+
disallowedReferences = [ "out" ];
23+
disallowedRequisites = [ "out" ];
24+
};
25+
packages.$system.hello-structured = (import ./config.nix).mkDerivation {
26+
__structuredAttrs = true;
27+
name = "hello";
28+
outputs = [ "out" "dev" ];
29+
meta.outputsToInstall = [ "out" ];
30+
buildCommand = "";
31+
# ensure we're stripping these from the environment derivation
32+
outputChecks.out = {
33+
disallowedReferences = [ "out" ];
34+
disallowedRequisites = [ "out" ];
35+
};
2136
};
2237
};
2338
}
@@ -142,4 +157,7 @@ echo "\$SHELL"
142157
EOF
143158
)" -ef "$BASH_INTERACTIVE_EXECUTABLE" ]]
144159

160+
# Test whether `nix develop` works with `__structuredAttrs`
161+
[[ -z "$(nix develop --no-write-lock-file .#hello-structured </dev/null)" ]]
162+
145163
clearStore

0 commit comments

Comments
 (0)