Make sure that nix build works in --impure mode

Regression test for <https://github.com/NixOS/nix/issues/6488>
This commit is contained in:
Théophane Hufschmitt 2022-05-05 14:53:59 +02:00
parent b3ed32d0fd
commit 4c5aa8520c

View file

@ -56,6 +56,13 @@ nix build -f multiple-outputs.nix --json 'e^*' --no-link | jq --exit-status '
(.outputs | keys == ["a", "b", "c"])) (.outputs | keys == ["a", "b", "c"]))
' '
# Make sure that `--impure` works (regression test for https://github.com/NixOS/nix/issues/6488)
nix build --impure -f multiple-outputs.nix --json e --no-link | jq --exit-status '
(.[0] |
(.drvPath | match(".*multiple-outputs-e.drv")) and
(.outputs | keys == ["a", "b"]))
'
testNormalization () { testNormalization () {
clearStore clearStore
outPath=$(nix-build ./simple.nix --no-out-link) outPath=$(nix-build ./simple.nix --no-out-link)