mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-11 00:36:20 +02:00
49ad315c03
Match the other syntax that was recently added
18 lines
478 B
Bash
18 lines
478 B
Bash
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)))
|
|
'
|