mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
New "indexed" installable syntax: <drvPath>!<outputName>
Being conservative and only doing a single output name for now.
This commit is contained in:
parent
4bf3eb27e6
commit
8499f32fb2
5 changed files with 72 additions and 3 deletions
17
tests/build-explicit-output.sh
Normal file
17
tests/build-explicit-output.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
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 and
|
||||
(has("second") | not)))
|
||||
'
|
||||
# TODO use
|
||||
# (.first | match(".*multiple-outputs-a-first")) and
|
||||
# once we make it put the result paths in the buildables.
|
Loading…
Add table
Add a link
Reference in a new issue