mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
15 lines
403 B
Bash
Executable File
15 lines
403 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
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"
|