diff options
Diffstat (limited to 'tests/functional/derivation-json.sh')
-rw-r--r-- | tests/functional/derivation-json.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/derivation-json.sh b/tests/functional/derivation-json.sh new file mode 100644 index 000000000..b6be5d977 --- /dev/null +++ b/tests/functional/derivation-json.sh @@ -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" |