1
0
Fork 0
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:
John Ericson 2023-02-17 18:37:35 -05:00
parent 27597f8131
commit 59e0728714
6 changed files with 108 additions and 4 deletions

12
tests/derivation-json.sh Normal file
View 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"