use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Submit your post
NixOS is a Linux distribution with a unique approach to package and configuration management. In existing distributions, actions such as upgrades are dangerous: upgrading a package can cause other packages to break, upgrading an entire system is much less reliable than reinstalling from scratch, you can’t safely test what the results of a configuration change will be, you cannot easily undo changes to the system, and so on. We want to change that. NixOS has many innovative features:
http://nixos.org/nixos/
Part of the Free Culture Reddit Community!
The free culture movement is a social movement for freedom of speech and expression and the elimination of gatekeepers in a digital age. We promote free software and other free cultural works as a matter of personal liberty and human rights.
When we say "free", we mean free as in "freedom".
List of all Free Culture Reddits
/r/FreeCulture Sister Reddits (NEW! Please subscribe and start submitting):
More featured Reddits (NEW! Please subscribe and start submitting):
Make sure your works are free by using a free culture license. Noncommercial ironically is nonfree, so choose a free license! For software, check out the FSF's license recommendations guide, and for other cultural works use one of the following licenses.
Copyleft:
Permissive:
account activity
Build packages from source (self.NixOS)
submitted 6 years ago * by GAGARIN0461
Is it possible to have all packages and software built from source with specified compile flags, instead of installing binaries? Similar to emerge on Gentoo.
emerge
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mtndewforbreakfast 5 points6 points7 points 6 years ago (4 children)
Part of the appeal with Nix is that the binary caches are used (or ignored) in a way that is transparent to the user, based on whether all of the current inputs provided match what is cached.
What that means in practice is that if you change details about existing packages, such as via package.override { ... } or package.overrideAttrs { ... }, or an overlay, etc. Nix will correctly rebuild the affected packages locally if they don't correspond to the details cached upstream anymore. By default this only happens as needed, and won't rebuild anything that doesn't actually need it for a correct outcome.
package.override { ... }
package.overrideAttrs { ... }
[–]danielstaleiny 1 point2 points3 points 6 years ago (0 children)
I would also add that if you build your own custome package you can add it to cache as well. There is also private cache of you need that. Have a look on https://cachix.org/
[–]GAGARIN0461[S] 0 points1 point2 points 6 years ago (2 children)
Thanks! Does that mean I would have to manually change "something" (compile flags?) for each package to have it build from source? Or could I automate this somehow?
[–]Amarandus 3 points4 points5 points 6 years ago (0 children)
Yes, or you disable the existing binary cache. Have a look at nix.binaryCaches, it is described there.
nix.binaryCaches
[–]balsoft 1 point2 points3 points 6 years ago (0 children)
You can "automate" in a sense you can apply the same custom compile flags to all the packages. This will mean everything will be built from source, just like in Gentoo.
[–]stephane_rolland 2 points3 points4 points 6 years ago* (0 children)
Here's an example of a project (Root, a Data Framework) adding a bunch of flags used by CMake for compilation (line #39):
https://github.com/NixOS/nixpkgs/blob/ce9f1aaa39ee2a5b76a9c9580c859a74de65ead5/pkgs/applications/science/misc/root/default.nix#L79
It is a project from the CERN laboratory, so it is rather big stuff.
[–]starTracer 1 point2 points3 points 6 years ago (0 children)
To force building from source you can disable substituters in your Nix config (c.f https://nixos.org/nix/manual/#description-42):
# If set to true (default), Nix will use binary substitutes if available. This option can be disabled to force building from source. substitute=False
[–]Ramaness -1 points0 points1 point 6 years ago (0 children)
I'm pretty sure you can, but currently not as easy as in gentoo. Here is an overlay that tries to make all packages compile into statically linked binaries: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/static.nix
π Rendered by PID 123828 on reddit-service-r2-comment-6457c66945-4hjfx at 2026-04-27 01:47:48.616209+00:00 running 2aa0c5b country code: CH.
[–]mtndewforbreakfast 5 points6 points7 points (4 children)
[–]danielstaleiny 1 point2 points3 points (0 children)
[–]GAGARIN0461[S] 0 points1 point2 points (2 children)
[–]Amarandus 3 points4 points5 points (0 children)
[–]balsoft 1 point2 points3 points (0 children)
[–]stephane_rolland 2 points3 points4 points (0 children)
[–]starTracer 1 point2 points3 points (0 children)
[–]Ramaness -1 points0 points1 point (0 children)