Nix Hackers | 963 Members | |
| For people hacking on the Nix package manager itself | 205 Servers |
| Sender | Message | Time |
|---|---|---|
| 19 Feb 2025 | ||
| For you the best option would be to not build such binary at all? Or something else? | 03:19:44 | |
or perhaps we need a #:distributable? argument, orthogonal of substitutability | 03:20:31 | |
any mechanism about not distributing a problematic derivation output is wholly orthogonal to whether the client can try substituting it, which there's no reason to let a derivation block as there are always legitimate use-cases (private LAN etc.) and which forbidding gets in the way of ("can't cache a closure properly because one of them is marked as !allowSubstitutes because it's meant to be trivial so build inputs get pulled in anyway") | 03:21:38 | |
as in, what allowSubstitutes is meant to do doesn't help solve the problem in question in any way, and what it's meant to do has largely (on the Nix side at least) turned out to hurt more than it helps | 03:22:14 | |
(I'd be hesitant to have CI build stuff that's considered legally problematic enough to not be distributable in the first place, but I guess Guix is strict enough about licensing that something like zfs.ko is probably the limit of the risk there.) | 03:23:28 | |
In reply to @emilazy:matrix.orgone question: another use of allowSubstitutes = 0 on Guix is for HPC packages, specifically those which have CPU-specific optimisations, so that a client doesn't substitute a package which is optimised for a different CPU. How does Nix handle this case? | 06:54:40 | |
| This is somewhat orthogonal to the distributability concern, I agree, but this is currently one of the main applications of non-substitutability for us. | 06:55:50 | |
In reply to @morgan.arnold:matrix.org Are you asking about https://wiki.nixos.org/wiki/Build_flags? See https://github.com/NixOS/nixpkgs/pull/202526#issue-1461820752 | 07:21:01 | |