2021-02-12 21:51:36 +00:00
|
|
|
source common.sh
|
|
|
|
|
|
|
|
drv=$(nix eval -f multiple-outputs.nix --raw a.drvPath)
|
|
|
|
if nix build "$drv!not-an-output" --json; then
|
|
|
|
fail "'not-an-output' should fail to build"
|
|
|
|
fi
|
|
|
|
|
|
|
|
nix build "$drv!first" --json | jq --exit-status '
|
|
|
|
(.[0] |
|
|
|
|
(.drvPath | match(".*multiple-outputs-a.drv")) and
|
|
|
|
(.outputs |
|
2022-03-10 17:03:16 +00:00
|
|
|
(.first | match(".*multiple-outputs-a-first")) and
|
|
|
|
(has("second") | not)))
|
2021-02-12 21:51:36 +00:00
|
|
|
'
|