| GNU Guix | |
|---|---|
| Original author | Ludovic Courtès |
| Initial release | 18 January 2013; 12 years ago (2013-01-18) |
| Stable release | |
| Repository | |
| Written in | GuileScheme,C++ (Nix core) |
| Platform | x86-64 |
| Available in | English |
| License | GPLv3+ |
| Website | guix |
GNU Guix (/ɡiːks/;[2]portmanteau of Guile and Nix[3]) is afunctional programming cross-platformpackage manager and a tool to instantiate and manageUnix-likeoperating systems, based on theNix package manager. Configuration and package recipes are written inGuileScheme. GNU Guix is the default package manager of theGNU Guix System distribution.[4]
Differing from traditionalpackage managers, Guix (like Nix) uses apurely functional programming deployment model where software is installed into unique directories generated throughcryptographic hash functions. All dependencies for each software are included in the input of each hash.[5][6] This solves the problem ofdependency hell,[7] allowing multiple versions of the same software to coexist which makes packages portable andreproducible. Performing scientific computations in a Guix setup has been proposed as a promising response to thereplication crisis.[8][9]
The development of GNU Guix is intertwined with theGNU Guix System,[10] an installableoperating system distribution using theLinux-libre kernel and theGNU Shepherdinit system.[11][12][13]
Guix packages are defined throughfunctional Guile Scheme APIs designed for package management. Dependencies are tracked directly in this language through special values named "derivations" which are evaluated by the Guixdaemonlazily. Guix keeps track of these references automatically so that installed packages can begarbage collected when no other package depends on them, at the cost of greater storage needs, all upgrades in Guix are guaranteed to beatomic and can be rolled back.
Theroll-back feature of Guix is inherited from the design ofNix and is rarely found in otheroperating systems, since it requires an unorthodox approach to how the system should function (seeMicroOS). However, the Guix package manager, likeNix, can be used on many distributions likeDebian andParabola.[14][15] This also enables multiple users to safely install software on the same system without administrator privileges.
Compared to traditional package managers, Guix package stores can grow considerably bigger and therefore require morebandwidth; although compared tocontainer solutions (likeDocker) that are also commonly employed to solvedependency hell, Guix is leaner and conforms to practices likedon't repeat yourself andsingle source of truth. If the user chooses to build everything from source, an even larger amount of storage space and bandwidth is required.
Inherited from the design of Nix, most of the content of the package manager is kept in a directory/gnu/store where only the Guixdaemon has write-access. This is achieved via specialisedbind mounts, where the Store as a file system is mountedread only, prohibiting interference even from the root user, while the Guix daemon remounts the Store as read/writable in its own private namespace. Guix talks with this daemon to build things or fetch substitutes which are all kept in the store. Users are discouraged from ever manually touching the store by re-mounting it as writable since this defeats the whole purpose of the store.
Guix - like Nix - has built-in garbage collection facilities to help prunedead store items and keep thelive ones.[16]
This is an example of a package definition for the hello-package:
(use-modules(guixpackages)(guixdownload)(guixbuild-systemgnu)(guixlicenses))(define-publichello(package(name"hello")(version"2.10")(source(origin(methodurl-fetch)(uri(string-append"mirror://gnu/hello/hello-"version".tar.gz"))(sha256(base32"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))(build-systemgnu-build-system)(synopsis"Hello, GNU world: An example GNU package")(description"GNU Hello prints the message\"Hello, world!\" and then exits. It serves as an example of standard GNU coding practices. As such, it supports command-line arguments, multiple languages, and so on.")(home-page"https://www.gnu.org/software/hello/")(licensegpl3+)))
It is written using Guile. The package recipes can easily be inspected (running e.g.guix edit hello) and changed in Guix, making the system transparent and very easy to modify.
Inherited from the design of Nix, all manipulation of store items is independent of each other, and the directories of the store begin with a base32-encoded hash of the source code of the derivation along with its inputs.
Guix package uses profiles generations, which are a collection ofsymbolic links (also known as "symlinks") to specific store items together comprising what the user has installed into the profile. Every time a package is installed or removed, a new generation will be built. For example, the profile of a user who only installed GNU Hello contains links to the store item which holds the version of hello installed with the currently used Guix. On versionc087a90e06d7b9451f802323e24deb1862a21e0f of Guix, this corresponds to the item:/gnu/store/md2plii4g5sk66wg9cgwc964l3xwhrm9-hello-2.10 (built from the recipe above).
In addition to symbolic links, each profile that Guix builds also contains a union of all theinfo-manuals, and theman pages, icons, fonts, etc., so a user can browse documentation and have access to all the icons and fonts installed. The default symbolic links to profile generations are stored under/var/guix.
The user can create any number of profiles by invokingguix package -p PROFILE-NAME COMMAND. A new directory with the profile-name as well as profile-generation-symlinks will then be created in the current directory.
Guix package enables instantaneous roll-back to a previous profile generation via changing the symlink to an earlier profile generation.[17] Profiles are also stored in the store e.g. this item is a profile containing hello above: /gnu/store/b4wipjlsapvnijmbawl7sh76087vpl4n-profile (built and activated when runningguix install hello).
Guix shell enables the user to easily enter an environment where all the necessary packages for development of software are present without clogging up the user's default profile with dependencies for multiple projects.[18]
E.g., runningguix shell --development hello enters a throw-away environment where everything needed to compilehello on Guix is present (GNU Compiler Collection (GCC),Guile, etc.).
Without the--development flag, only the packagehello would be installed and not its build-dependencies. This supplants theguix environment command, which installs the dependencies of a package by default, as it was considered more intuitive for the command to install the specified packages by default and only install development dependencies with a flag.[19]
If a user wants a persistent gc-rooted environment that is not garbage collected on the next run of the Guix garbage collector they can create a root: e.g. runningguix shell --root=hello-root --development hello enters an environment where everything needed to compile Guix is present and registered as a root in the current directory (by symlinking to the items in the store).
Guix pack enables the user to bundle together store items and output them as either aDocker binary image, a relocatabletarball, aDebian package file, aRPM package file, anAppImage or aSquashFS binary.[20][21][22]
The Guix graph feature enables the user to view different graphs of the packages and their dependencies.[23]
Guix allows the user to specify additional channels for package definitions.[24]
This feature can also be used to installnon-free software and firmware that cannot be packaged in the main project.[25][26]
| GNU Guix System | |
|---|---|
| Developer | GNU Project[27][28] |
| OS family | Linux (Unix-like),Lisp machine |
| Working state | Current[29] |
| Source model | Free software,FSDG |
| Latest release | 1.4.0[30] |
| Repository | |
| Marketing target | desktop |
| Package manager | GNU Guix |
| Supported platforms | x86-64,i686,AArch64,armv7,PowerPC64le |
| Kernel type | Monolithic:Linux-libre (operational)Microkernel:GNU Hurd (in development) |
| Userland | GNU |
| License | GPL |
| Official website | guix |
GNU Guix System orGuix System[31][32] (formerly namedGuixSD[33]) is arolling release,free and open sourceLinux distribution built on Guix, similar to howNixOS is built onNix.[34][35] It enables adeclarative programming operating system configuration[36] and allows system upgrades that the user canrollback.[37] It uses the GNU Shepherdinit system[38][39] and theLinux-libre kernel, with the support of theGNU Hurd kernel under development.[40] On February 3, 2015, theFree Software Foundation added the distribution to its list of endorsed free Linux distributions.[41]
Central processing unit (CPU) architecture support includes:[42]
System services, which are defined in the Guile Scheme,[46] enable the user to declaratively compose the configuration ofdaemons and background services and specify configurations. This enables the user, within a single configuration file or modularized configuration, to configure the whole operating system (e.g., to have aTorproxy, anssh server, and a webserver serving guix-web vianginx on a specific port atbootup). They can:[47]
The GNU Guix System uses theGNU Daemon Shepherd, formerly known asDaemon managing Daemons (dmd), as itsinit system, which is developed in tandem with Guix and is written and configurable inGuile.[48] It supplies user-space functionality asynchronously as services, which under Shepherd aregeneric functions andobjectdata types which it uses to extend the base operating system in a defined way. In contrast tosystemd, a userspace shepherd process runs as the user. Central to the Shepherd model ofuser space initialization is the concept of theextension, a form ofcomposability whereby services are designed to be layered onto other services, augmenting them with more elaborate or specialized behaviours as desired.[49] This expresses the instantiation-based dependency relationships found in many modern init systems,[50] making the system modular, but also allows services to interactvariadically with other services in arbitrary ways, e.g. a service that extends two other services,requiring only one to be present, but readily extending the second one if it is later instantiated without the need for any further reconfiguration or setup.
Shepherd also providesvirtual services which allowdynamic dispatch over a class of related service objects, such as all those which instantiate amail transfer agent (MTA) for the system.[51] A system governed via the Shepherd daemon can represent its user space as adirected acyclic graph, with the "system-service," which is responsible for early phases of booting up the system and initializing it, as its root, and all subsequently initialized services as extensions to system-service functionality, either directly or transitively over other services.[49][52]
It is intended to be highly programmable by thesystem administrator using Guile Scheme, but it can also be used to manage per-user profiles of unprivileged daemons and services.[53] Its services and configuration are stored uniformly as object-orientedScheme code, and while a core set of services are provided with the basic GNU Guix System,[54] arbitrary new services can be flexibly declared, and through Guile'sobject system,GOOPS, existing services can be redefined at the user's discretion by asking the Shepherd to dynamically rewrite services in specified ways on instantiation.[55][56]
GNU Shepherd was originally designed to work withGNU Hurd, and was later adopted by GNU Guix System.[57]
Similar to the roll-back feature ofNix, if a system update leaves users with a broken system, users can easily roll back individual packages as well as the whole system state with a single command,guix package --roll-back.[58]
This means that the kind of stable channel that is very common in other Linux distributions is no longer needed for users who are willing to report a bug and wait a few minutes, when trying to update viaguix pull. This is accomplished by a combination of Guix's functionalpackage manager, which treats each package and system configuration as an immutable and reproducible entity,[59] and the generation system which maintains a history of system configurations as "generations." These generations are stored as separate profiles, which allows the user to roll back to any previous configuration,[60] and these generations can be shown withguix package --list-generations.
Jesse Smith fromDistroWatch Weekly reviewed GNU Guix System 0.15.0 (then named GuixSD), and said, "GuixSD has a package manager that I like", but criticized the limited hardware support and its limited documentation.[61] The documentation has since then been expanded and improved with videos[62] and a cookbook[63] in six languages with tutorials, how-to guides and examples.
One area where Guix aims to improve over traditional package managers is in the field of reproducible scientific workflows, mainly inhigh-performance computing.[64] In this way, Guix would offer a way to share a reproducible computational environment, i.e., Guix using a recipe for a given scientific software and environment would provide all the information needed to uniquely describe the dependency tree to build and run that software.[65] This would not be easy to achieve, for example, in other mixed systems with several package managers for each programming language. However, this only provides a necessary but insufficient condition for scientific workflows to be reproducible, as it is necessary to incorporate data collection and processing into the workflow, if this is added as part of the Guix recipe, it could satisfy the strict reproducibility requirements.
The project began in June 2012 by Ludovic Courtès, one of the GNU Guile hackers.[66]
TheGNU Project announced in November 2012 the first release of GNU Guix, a functional package manager based onNix that provides, among other things,GuileScheme application programming interfaces (APIs).[67]
On August 20, 2015, it was announced that Guix had been ported toGNU Hurd.[68]
The project has no fixed release schedule and has until now released approximately every 6 months.
The project migrated away fromGNU Savannah toCodeberg on May 25th 2025.[69]
As of October 2025[update], the release of version 1.5.0 is being worked on. It is set to be released on 5th January 2026.[70]
| Version | Announcement | Supported architectures | Packages |
|---|---|---|---|
| 0.1 (alpha) | Courtès, Ludovic (18 January 2013)."GNU Guix 0.1 released (alpha)". |
| ~150 |
| 0.2 (alpha) | Courtès, Ludovic (12 May 2013)."GNU Guix 0.2 released (alpha)". | ~400 | |
| 0.3 | Courtès, Ludovic (17 Jul 2013)."GNU Guix 0.3 released". | ~430 | |
| 0.4 | Courtès, Ludovic (27 Sep 2013)."GNU Guix 0.4 released". | ~490 | |
| 0.5 | Courtès, Ludovic (11 Dec 2013)."GNU Guix 0.5 released". | ~600 | |
| 0.6 | Courtès, Ludovic (9 Apr 2014)."GNU Guix 0.6 released". | ~691 | |
| 0.7 | Courtès, Ludovic (25 Jul 2014)."GNU Guix 0.7 released". | ~825 | |
| 0.8 | Courtès, Ludovic (18 Nov 2014)."GNU Guix 0.8 released". |
| ~987 |
| 0.8.1 | Courtès, Ludovic (29 Jan 2015)."GNU Guix 0.8.1 released". |
| ~1,151 |
| 0.8.2 | Courtès, Ludovic (14 May 2015)."GNU Guix 0.8.2 released". | ~1,869 | |
| 0.8.3 | Courtès, Ludovic (22 Jul 2015)."GNU Guix 0.8.3 released". | ~2,048 | |
| 0.9.0 | Courtès, Ludovic (5 Nov 2015)."GNU Guix 0.9.0 released". | ~2,591 | |
| 0.10.0 | Courtès, Ludovic (29 Mar 2016)."GNU Guix & GuixSD 0.10.0 released". | ~3,230 | |
| 0.11.0 | Courtès, Ludovic (3 Aug 2016)."GNU Guix & GuixSD 0.11.0 released". | ~3,714 | |
| 0.12.0 | Wurmus, Ricardo (21 December 2016)."GNU Guix & GuixSD 0.12.0 released". | ~4,567 | |
| 0.13.0 | Courtès, Ludovic (22 May 2017)."GNU Guix & GuixSD 0.13.0 released". |
| ~5,407 |
| 0.14.0 | Courtès, Ludovic (7 Dec 2017)."GNU Guix & GuixSD 0.14.0 released". | ~6,618 | |
| 0.15.0 | Courtès, Ludovic (6 Jul 2018)."GNU Guix & GuixSD 0.15.0 released". | ~7,857 | |
| 0.16.0 | Courtès, Ludovic (6 Dec 2018)."GNU Guix & GuixSD 0.16.0 released". | ~8,715 | |
| 1.0.0 | Courtès, Ludovic (2 May 2019)."GNU Guix 1.0.0 released". | ~9,712 | |
| 1.0.1 | Courtès, Ludovic (19 May 2019)."GNU Guix 1.0.1 released". | ~9,771 | |
| 1.1.0 | Courtès, Ludovic (15 April 2020)."GNU Guix 1.1.0 released". |
| ~13,161 |
| 1.2.0 | Courtès, Ludovic (23 November 2020)."GNU Guix 1.2.0 released". | ~15,333 | |
| 1.3.0 | Courtès, Ludovic (11 May 2021)."GNU Guix 1.3.0 released". |
| ~17,262 |
| 1.4.0 | Courtès, Ludovic (19 December 2022)."GNU Guix 1.4.0 released". |
| ~22,000 |