aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/derivation-json.sh
blob: b6be5d977da60090657a49b9e35ed2e57b980c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
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"