[quote="Ekleog, post:12, topic:657]
Hmm… My initial idea was to tag how packages are used, rather than how packages are made. The aim being to support things like using glib
as a dependency, while only relying on the headers part of it. glib
could be a binary-only dependency, it wouldn’t matter much, as only source code is used from it. This also answers why gcc
and coreutils
would be binary dependencies: they are used as binaries.
[/quote]
Is that distinction common enought to warrant the difference?
[quote="Ekleog, post:12, topic:657]
Now, upon giving it a bit more thought, I’m no longer sure this is really useful. I guess I missed the “infection” part of your proposal, when writing this message!
[/quote]
I think I didn’t make that explicit. But thats the same way unfree packages currently work: If allowUnfree
is false, I can’t build anything that has an unfree package anywhere in its closure.
[quote="Ekleog, post:12, topic:657]
Indeed, so with the infecting meta.binary
attribute, I guess one option would be to have a nixpkgs configuration option allowBinary: derivation -> bool
, that would allow (or not) installing a binary by doing something like all $ map (d: isBinary d || allowBinary d) transitiveDeps
on the transitive dependencies of each to-be-installed package?
[/quote]
I’m guessing (no clue how it actually works) the current allowUnfree
mechanism could be re-used. But for whitelisting, such a function would be awesome (also for allowUnfree
). Probably best to give a default that just checks a simple whitelist (allowed-binary = [pkgs.not-a-virus pkgs.foobar]
) though.
[quote="Ekleog, post:12, topic:657]
Indeed, I’m not really suggesting we turn this on by default on hydra
(although this may be something that works, so long as the root of the tree is “carved in stone” – it shouldn’t require many changes anyway, so maybe the cost would be palatable?). However, it would may make sense for paranoid-enough individuals 
[/quote]
Yes it might be, we wouldn’t know before trying
It would certainly be awesome to have the possibility. A great effort too, though.
[quote="Ekleog, post:12, topic:657]
Now comes the question of how to migrate from the current “don’t tag anything” to tagging all derivations as either binary or built-from-source. I think that, for safety, meta.binary
should default to true
. But requiring a change to all derivations in nixpkgs sounds impossible.
[/quote]
I think given that the vast majority of nixpkgs should be build from source right now, just defaulting to true
and gradually mark the binary packages is more practical. It won’t be reliable right away, but it would be minimally invasive, better than the current state and “eventually consistent”.
[quote="Ekleog, post:12, topic:657]
So maybe just set meta.binary
that defaults to true
for the fetching builtins? With this, all packages that come from outside would be considered as binary by default, and derivations built from other derivations would default to non-binary, which seems to make sense. It would still require quite a bit of work, though.
[/quote]
Don’t basically all derivations fetch their src
from outside? Packages using fetchFromVCS
should normally be built from source though.