Describe the bug
nix copy
is supposed to copy full closures and not build anything.
However, it does build stuff when copying drv files.
Steps To Reproduce
broken.nix
withderivation {
name = "test";
system = "x86_64-linux";
builder = "this will error";
}
nix copy $(nix-instantiate broken.nix) --to ssh://a-string-that-does-not-matter
Expected behavior
The file should just be copied.
nix-env --version
output
nix-env (Nix) 2.4pre20200521_00b562c
Additional context
cc @ajs124
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/to-flake-or-not-to-flake/10047/7
Doubt anyone will ever change their decision on this "design choice".
FYI, nix copy
has a flag --derivation
to copy the derivation rather than its outputs.