I’ve got a “toolsuite” to package with nixpkgs, and it is absolutely huge. The unpacked binary distribution is 8GiB in size.
I’ve been trying to write a derivation for the whole thing, but at a sluggish pace, because the first thing nix-build does is copy this huge chunk of source material into the Nix store, at least when I use src = unpacked-binary-distribution/., which I am doing for now to seemingly iterate faster. Maybe I’m wrong though and something else is slowing this down.
Ideally, I’d like to have almost no copying involved in developing this, and also have different derivations for the different tools involved in the package in the end. So somebody can say nix-build -A my-small-program or nix run my-repo#my-small-program and have a small download size in the end.
Is there good practice advice for such a thing?