Guix: An advanced operating system
Guix co-maintainer here.<p>The article says &quot;Guix is a fork of Nix&quot;, but this is not correct.  Guix uses the same format for derivations (~ a low-level representation of builds), so that it can reuse the Nix daemon, but that doesn&#x27;t make it a fork.<p>Guix builds upon the very same idea of functional package management that was pioneered with Nix, so they <i>are</i> very close and they do have shared roots.  But that&#x27;s not what &quot;fork&quot; is usually understood to mean.<p>Here&#x27;s something I wrote a few months ago (with minor changes) to clarify the relationship between these two projects. I hope this helps.<p>-------------------<p>As one of the co-maintainers of GNU Guix I&#x27;m obviously biased, but here&#x27;s what I consider some important unique features of Guix:<p>- Guix is all written in Guile Scheme (with the exception of parts of the inherited daemon, which hasn&#x27;t yet been completely implemented in Guile); this extends to development tools like importers, updaters, to user tools like &quot;guix environment&quot;, and even bleeds into other projects that are used by GuixSD (the GNU system distribution built around Guix), such as the shepherd init system. There is a lot of code reuse across the stack, which makes hacking on Guix really fun and smooth.<p>- Packages are first class citizens in Guix. In Nix the idea of functional package management is very obvious in the way that packages are defined, namely as functions. These functions take their concrete inputs from an enormous mapping. In Guix you define first-class package values as Scheme variables. These package values reference other package values, which leads to a lazily constructed graph of packages. This emergent graph can be used as a library to trivially build other tools like &quot;guix graph&quot; (for visualising the graph in various ways) or &quot;guix web&quot; (for a web interface to installing and searching packages), &quot;guix refresh&quot; (for updating package definitions), a lovely feature-rich Emacs interface etc.<p>- Embedded DSL. Since Guix is written in Scheme---a language for writing languages---it was an obvious choice to embed the package DSL in the host language Scheme instead of implementing a separate language that needs a custom interpreter. This is great for hacking on Guix, because you can use all the tools you&#x27;d use for Scheme hacking. There&#x27;s a REPL, great Emacs support, a debugger, etc. With its support for hygienic macros, Scheme is also a perfect vehicle to implement features like monads (we use a monadic interface for talking to the daemon) and to implement other convenient abstractions.<p>- Graph rewriting. Having everything defined as regular Scheme values means that you can almost trivially go through the package graph and rewrite things, e.g. to replace one variant of a package with a different one. Your software environment is just a Scheme value and can be inspected or precisely modified with a simple Scheme API.<p>- Code staging. Thanks to different ways of quoting code (plain S-expressions and package-aware G-expressions), we use Scheme at all stages: on the &quot;host side&quot; as well as on the &quot;build side&quot;. Instead of gluing together shell snippets to be run by the daemon we work with the AST of Scheme code at all stages. If you&#x27;re interested in code staging I recommend reading this paper: <a href="https:&#x2F;&#x2F;hal.inria.fr&#x2F;hal-01580582&#x2F;en" rel="nofollow">https:&#x2F;&#x2F;hal.inria.fr&#x2F;hal-01580582&#x2F;en</a><p>- Bootstrapping. Some of us are very active in the &quot;bootstrappable builds&quot; community (see <a href="http:&#x2F;&#x2F;bootstrappable.org" rel="nofollow">http:&#x2F;&#x2F;bootstrappable.org</a>) and are working towards full bootstrap paths for self-hosting compilers and build systems. One result is a working bootstrap path of the JDK from C (using jikes, GNU classpath, jamvm, icedtea, etc). In Guix we take bootstrapping problems serious and prefer to take the longer way to build things fully from source instead of just adding more binary blobs. This means that we cannot always package as many things as quickly as others (e.g. Java libraries are hard to build recursively from source). I&#x27;m currently working on bootstrapping GHC without GHC and without the generated C code, but via interpreting a variant of GHC with Hugs. Others are working on bootstrapping GCC via Scheme.<p>- GuixSD, the GNU system distribution built around Guix. GuixSD has many features that are very different from NixOS. The declarative configuration in Scheme includes system facilities, which also form a graph that can be inspected and extended; this allows for the definition of complex system facilities that abstract over co-dependent services and service configurations. GuixSD provides more Scheme APIs that apply to the whole system, turning your operating system into a Scheme library.<p>- I like the UI of Guix a lot more than that of Nix. With Nix 2.0 many perceived problems with the UI have been addressed, of course, but hey, I still prefer the Guix way. I also really like the Emacs interface, which is absolutely gorgeous. (What can I say, I live in Emacs and prefer rich 2D buffers over 1D command line strings.)<p>- It&#x27;s what I want GNU to be. I&#x27;m a GNU hacker and to me Guix is a representative of a modern and innovative GNU. It&#x27;s great to see more GNU projects acting as one within the context of Guix and GuixSD to provide an experience that is greater than the sum of its parts. Work on Guix affected other GNU packages such as the Hurd, Guile, Mes, cool Guile libraries, and led to a bunch of new GNU packages such as a workflow language for scientific computing.<p>On the other hand, although Guix has a lot of regular contributors and is very active, Nix currently has more contributors than Guix. Guix is a younger project. The tendency to take bootstrapping problems very seriously means that sometimes difficult packages require more work. Oddly, Guix seems to attract more Lispers than Haskellers (I&#x27;m a recovering Haskeller who fell in love with Scheme after watching the SICP lecture videos); it seems to be the other way around with Nix.<p>Having said all that: Nix and Guix are both implementations of functional package management. Both projects solve similar problems and both are active in the reproducible builds efforts. Solutions that were found by Nix devs sometimes make their way into Guix and vice versa. The projects are not competing with one another (there are orders of magnitudes more people out there who use neither Guix nor Nix than there are users of functional package managers, so there&#x27;s no point in trying to get people who use Nix to switch to Guix). At our recent Guix fringe event before FOSDEM Eelco Dolstra (who invented functional package management and Nix) gave a talk on the future of Nix surrounded by Guix hackers --- there is no rivalry between these two projects.