1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00
nix/tests/build-explicit-output.sh

15 lines
394 B
Bash

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 |
(.first | match(".*multiple-outputs-a-first")) and
(has("second") | not)))
'