mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Create nix derivation add
command
Also refine `nix derivation show`'s docs very slightly.
This commit is contained in:
parent
27597f8131
commit
59e0728714
6 changed files with 108 additions and 4 deletions
12
tests/derivation-json.sh
Normal file
12
tests/derivation-json.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
source common.sh
|
||||
|
||||
drvPath=$(nix-instantiate simple.nix)
|
||||
|
||||
nix derivation show $drvPath | jq .[] > $TEST_HOME/simple.json
|
||||
|
||||
drvPath2=$(nix derivation add < $TEST_HOME/simple.json)
|
||||
|
||||
[[ "$drvPath" = "$drvPath2" ]]
|
||||
|
||||
# Input addressed derivations cannot be renamed.
|
||||
jq '.name = "foo"' < $TEST_HOME/simple.json | expectStderr 1 nix derivation add | grepQuiet "has incorrect output"
|
Loading…
Add table
Add a link
Reference in a new issue