blob: 68fd2f128f917c062dfbb5ca954e6a3546722af7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
source common.sh
enableFeatures "computed-derivations"
restartDaemon
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 |
(keys | length == 1) and
(.first | match(".*multiple-outputs-a-first")) and
(has("second") | not)))
'
|