Guix: The most advanced operating system


Gentoo together with all distributions using the Portage package manager are source-based distributions with an iconic feature: the USE flags, which lets the user enable features across the whole system (for instance disable sound, enable graphical interface support, etc.).

USE flags make it trivial to toggle features that were exposed by the packagers (and they have the benefit of being tested). On the other hand, Portage does not let you configure features that were not thought of in advance by the packager. For instance, if a package has optional audio but the packager didn’t expose the corresponding USE flag, the user can’t do anything about it (beside creating a new package definition).

Conversely, Guix gives you full customization for everything, albeit with a bit more Scheme code. Roughly, in pseudo-code:

(loop-over (TARGET-PACKAGES) (package (inherit TARGET) (changes-here... including patches, build options, etc.))

will batch-define TARGET-PACKAGES with your changes. None of the changes have to be carved into the package definition. The user has 100% control over the changes to make to the package at any time.

I’ve loved Gentoo while I was using it, but after moving to Guix it became apparent that Portage’s approach to package customization is more limited.

  • The USE flag system does not let you customize unplanned, arbitrary features.
  • USE flags add a whole class of complexity (see the rather complex atom semantic) to describe and manager feature relationships across packages. Guix completely nullifies this complexity layer by using Guile Scheme to program the relationships between packages.

Moreover, Portage suffer from the same aforementioned issue with the lack of proper support for multiple versions. Indeed, USE flags make it an order of magnitude worse (a frequent complaint about Portage): when incompatible USE flags propagate to some dependencies, the user must find a resolution manually. Sometimes, it means that the desired feature won’t be applicable (at least not without significant work on the package definitions). A source of bad headaches…

On the practical level, Guix provides pre-compiled packages which can be a huge time-saver compared to Gentoo which does not (but Portage support binary package distribution).

The *BSD systems (e.g. FreeBSD) suffer from similar issues with the make config customization interface.