3 ms·
I think NixOS has kind of taken over anything I would use Gentoo for.
by chpatrick 3y ago
I think NixOS has kind of taken over anything I would use Gentoo for.
- 1oooqooq 3y agoyou build "impure" (in nixos speak) packages for all your software? if not this is not a close comparisson. gentoo shines when you need system wide control of build flags (for perf or security)
- chpatrick 3y agoI don't know what you mean by impure package. You can modify the build of any nix package and it will rebuild everything just like Gentoo. I don't personally believe in the CFLAGS "performance" micro-optimization though so that's not really something that matters to me. Security is pretty hardened by default on Nix: https://nixos.org/manual/nixpkgs/stable/#sec-hardening-flags-enabled-by-default https://nixos.org/manual/nixpkgs/stable/#sec-hardening-flags...
- 1oooqooq 3y ago> I don't know what you mean by impure package. Then you haven't read their own docs but are providing lessons online for it :/ I used quotes because it is their term for that procedure.
- __MatrixMan__ 3y agoIt seems like a close comparison to me. The inputs to nix derivations aren't always directly named after the build flags they control, but ultimately they control build flags. If you disable the binary cache then you're building everything yourself with system wide control of build flags. Purity has to do with whether you let those builds depend on things that found lying around on the system versus things that are explicitly in the derivation (i.e. a pure build can tolerate missing files by building them, an impure one may get stuck for lack of a dependency or because a dependency was not as expected).
- yjftsjthsd-h 3y ago> gentoo shines when you need system wide control of build flags I'm pretty sure nixos can do that, though? There's this for CFLAGs on a single package: nix-shell -p 'hello.overrideDerivation (old: { NIX_CFLAGS_COMPILE = "-Ofoo"; })' --run "hello --version" And this page seems to talk about overriding settings for all of nixpkgs, and even something kind of like USE flags (although I agree that it's way less powerful and generic than USE flags; that's one place Gentoo wins): https://nixos.org/guides/nix-pills/nixpkgs-overriding-packages.html https://nixos.org/guides/nix-pills/nixpkgs-overriding-packag...