nix copy builds drv files

Created on 15 Jun 2020  路  3Comments  路  Source: NixOS/nix

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

  1. Create broken.nix with
derivation {
  name = "test";
  system = "x86_64-linux";
  builder = "this will error";
}
  1. 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

bug

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings