GNU Guix (;
portmanteau
In linguistics, a blend—also known as a blend word, lexical blend, or portmanteau—is a word formed by combining the meanings, and parts of the sounds, of two or more words together. of Guile and Nix) is a
functional cross-platform
package manager
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
and a tool to instantiate and manage
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating systems, based on the
Nix package manager. Configuration and package recipes are written in
Guile Scheme. GNU Guix is the default package manager of the
GNU Guix System distribution.
Differing from traditional
package manager
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
s, Guix (like Nix) utilizes a purely
functional deployment model where software is installed into unique directories generated through
cryptographic hashes. All dependencies for each software are included in the input of each hash. This solves the problem of
dependency hell
Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.
The dependency issue arises when several packages ha ...
, allowing multiple versions of the same software to coexist which makes packages portable and
reproducible. Performing scientific computations in a Guix setup has been proposed as a promising response to the
replication crisis
The replication crisis, also known as the reproducibility or replicability crisis, refers to the growing number of published scientific results that other researchers have been unable to reproduce or verify. Because the reproducibility of empir ...
.
[
][
]
The development of GNU Guix is intertwined with the
GNU Guix System,
an installable operating system distribution using the
Linux-libre
According to the Free_Software_Foundation_Latin_America , Free Software Foundation Latin America, Linux-libre is a modified version of the Linux kernel that contains no binary blobs, Obfuscation (software), obfuscated code, or code released u ...
kernel and
GNU Shepherd init system.
General features
Guix packages are defined through
functional Guile Scheme APIs specifically designed for package management.
Dependencies are tracked directly in this language through special values called "derivations" which are evaluated by the Guix daemon
lazily.
Guix keeps track of these references automatically so that installed packages can be
garbage collected when no other package depends on them - at the cost of greater storage requirements, all upgrades in Guix are guaranteed to be
atomic and can be rolled back.
The roll-back feature of Guix is inherited from the design of
Nix and is rarely found in other
operating systems
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
, since it requires an unorthodox approach to how the system should function (see
MicroOS).
The Guix package manager, like
Nix, can however be used on many distributions like
Debian
Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
and
Parabola
In mathematics, a parabola is a plane curve which is Reflection symmetry, mirror-symmetrical and is approximately U-shaped. It fits several superficially different Mathematics, mathematical descriptions, which can all be proved to define exactl ...
.
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 more bandwidth; although compared to
container
A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping.
Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
solutions (like
Docker) that are also commonly employed to solve
dependency hell
Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.
The dependency issue arises when several packages ha ...
, Guix is leaner and conforms to practices like
don't repeat yourself
"Don't repeat yourself" (DRY) is a principle of software development aimed at reducing repetition of information which is likely to change, replacing it with abstractions that are less likely to change, or using data normalization which avoids r ...
and
single source of truth. If the user chooses to build everything from source, even larger storage space and bandwidth is required.
The store
Inherited from the design of Nix, most of the content of the package manager is kept in a directory ''/gnu/store'' where only the Guix
daemon
A demon is a malevolent supernatural being, evil spirit or fiend in religion, occultism, literature, fiction, mythology and folklore.
Demon, daemon or dæmon may also refer to:
Entertainment Fictional entities
* Daemon (G.I. Joe), a character ...
has write-access. This is achieved via specialised
bind mounts, where the Store as a file system is mounted
read 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.
Garbage collection
Guix - like Nix - has built-in garbage collection facilities to help prune ''dead'' store items and keep the ''live'' ones.
Package definitions
This is an example of a package definition for the hello-package:
(use-modules
(guix packages)
(guix download)
(guix build-system gnu)
(guix licenses))
(define-public hello
(package
(name "hello")
(version "2.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/hello/hello-" version
".tar.gz"))
(sha256
(base32
"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(build-system gnu-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/")
(license gpl3+)))
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.
Transactional upgrades
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.
Profiles
Guix package uses profiles generations, which are a collection of 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 version
c087a90e06d7b9451f802323e24deb1862a21e0f
of guix, this corresponds to the item:
/gnu/store/md2plii4g5sk66wg9cgwc964l3xwhrm9-hello-2.10
(built from the recipe above).
In addition to symlinks, each profile guix builds also contains a union of all the info-manuals, man-pages, icons, fonts, etc. so that the user can browse documentation and have access to all the icons and fonts installed. The default symlinks to profile generations are stored under
/var/guix
.
Multiple user profiles
The user can create any number of profiles by invoking . A new directory with the profile-name as well as profile-generation-symlinks will then be created in the current directory.
Roll-back
Guix package enables instantaneous roll-back to a previous profile generation via changing the symlink to an earlier profile generation. 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 running ''guix install hello'').
Shell environment
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.
E.g. running enters a throw-away environment where everything needed to compile ''hello'' on guix is present (gcc, guile, etc.).
Without the flag, only the package ''hello'' would be installed and not its build-dependencies. This supplants the 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.
Persistent development environment
If a user wants a persistent gc-rooted environment that is not garbage collected on the next run of guix gc they can create a root: e.g. running enters an environment where everything needed to compile guix is present (gcc, guile, etc.) and registered as a root in the current directory (by symlinking to the items in the store).
Pack
Guix pack enables the user to bundle together store items and output them as either a docker binary image, a relocatable
tarball, a
Debian package file, a
RPM package file, an
AppImage or a
squashfs
Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is ...
binary.
Graph
Guix graph enables the user to view different graphs of the packages and their dependencies.
Third-party channels
Guix allows you to specify additional channels for package definitions.
This feature can also be used to install
non-free software and firmware that cannot be packaged in the main project.
GNU Guix System (operating system)
GNU Guix System or Guix System (previously known as ''GuixSD''
) is a
rolling release
Rolling release, also known as rolling update or continuous delivery, is a concept in software development of frequently delivering updates to applications. This is in contrast to a ''standard'' or '' point release'' development model which uses ...
,
free and open source
Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
built around Guix, similar to how
NixOS is built around
Nix. It enables a declarative operating system configuration and allows system upgrades that the user can
rollback. It uses the GNU Shepherd
init
In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down. It is the direc ...
system and the
Linux-libre
According to the Free_Software_Foundation_Latin_America , Free Software Foundation Latin America, Linux-libre is a modified version of the Linux kernel that contains no binary blobs, Obfuscation (software), obfuscated code, or code released u ...
kernel, with the support of the
GNU Hurd kernel under development. On February 3, 2015, the
Free Software Foundation
The Free Software Foundation (FSF) is a 501(c)(3) non-profit organization founded by Richard Stallman on October 4, 1985. The organisation supports the free software movement, with the organization's preference for software being distributed ...
added the distribution to its list of endorsed free Linux distributions.
Architecture support
The following CPU architectures are supported:
*
IA-32
IA-32 (short for "Intel Architecture, 32-bit", commonly called ''i386'') is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the i386, 80386 microprocessor in 1985. IA-32 is the first incarn ...
*
x86-64
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
*
ARMv7
ARM (stylised in lowercase as arm, formerly an acronym for Advanced RISC Machines and originally Acorn RISC Machine) is a family of reduced instruction set computer, RISC instruction set architectures (ISAs) for central processing unit, com ...
*
AArch64
AArch64, also known as ARM64, is a 64-bit version of the ARM architecture family, a widely used set of computer processor designs. It was introduced in 2011 with the ARMv8 architecture and later became part of the ARMv9 series. AArch64 allows ...
*
POWER9
*
RISC-V 64
*
MIPS64
System services
System services, which are defined in the Guile Scheme, enable the user to declaratively compose the configuration of
daemons 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 a
Tor proxy, an
ssh server, and a webserver serving guix-web via
nginx
(pronounced "engine x" , stylized as NGINX or nginx) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Russian developer Igor Sysoev and publicly released in 20 ...
on a specific port at bootup). They can:
* generate files in the filesystem (needed by some applications e.g. files in ''/etc'')
* run any code for setting up daemons
* create specific user and group accounts (e.g. a database user for
PostgreSQL
PostgreSQL ( ) also known as Postgres, is a free and open-source software, free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transaction processing, transactions ...
)
GNU Shepherd init system
The GNU Guix System uses the GNU Daemon Shepherd, formerly known as "dmd" ("Daemon managing Daemons"), as its
init
In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down. It is the direc ...
system, which is developed in tandem with Guix and is written and configurable in
Guile. It supplies user-space functionality asynchronously as services, which under Shepherd are
generic functions and
object
Object may refer to:
General meanings
* Object (philosophy), a thing, being, or concept
** Object (abstract), an object which does not exist at any particular time or place
** Physical object, an identifiable collection of matter
* Goal, an a ...
data type
In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
s which it uses to extend the base operating system in a defined way. In contrast to
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
, a userspace shepherd process runs as the user. Central to the Shepherd model of
user space
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
initialization is the concept of the ''extension'', a form of
composability whereby services are designed to be layered onto other services, augmenting them with more elaborate or specialized behaviours as desired.
This expresses the instantiation-based dependency relationships found in many modern init systems, making the system modular, but also allows services to interact
variadically 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 provides ''virtual services'' which allow
dynamic dispatch
In computer science, dynamic dispatch is the process of selecting which implementation of a polymorphic operation (method or function) to call at run time. It is commonly employed in, and considered a prime characteristic of, object-oriented ...
over a class of related service objects, such as all those which instantiate a
mail transfer agent
Within the Internet email system, a message transfer agent (MTA), mail transfer agent, or mail relay is software that transfers electronic mail messages from one computer to another using the Simple Mail Transfer Protocol. In some contexts, the a ...
(MTA) for the system. A system governed via the Shepherd daemon can represent its user space as a
directed acyclic graph
In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ...
, with the "system-service," which is responsible for early phases of boot and init, as its root, and all subsequently initialized services as extensions to system-service functionality, either directly or transitively over other services.
It is intended to be highly programmable by the system administrator using Guile, but it can also be used to manage per-user profiles of unprivileged daemons and services. Its services and configuration are stored uniformly as object-oriented
Scheme code, and while a core set of services are provided with the basic GNU Guix System, arbitrary new services can be flexibly declared, and through Guile's
object 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.
GNU Shepherd was originally designed to work with
GNU Hurd, and was later adopted by GNU Guix System.
Roll-back
Similar to the roll-back feature of
Nix, 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
.
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 via ''guix pull''. This is accomplished by a combination of Guix's functional
package manager
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
, which treats each package and system configuration as an immutable and reproducible entity, 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, and these generations can be shown with
guix package --list-generations
.
Reception
Jesse Smith from DistroWatch Weekly reviewed GNU Guix System 0.15.0 (at the time named GuixSD), and said, "GuixSD has a package manager that I like", but criticized the limited hardware support and its limited documentation. The documentation has since then been expanded and improved with videos and a cookbook in six languages with tutorials, how-to guides and examples.
Reproducible Scientific Workflows
One particular area where Guix can offer to the user improvements over traditional package managers is in the field of reproducible scientific workflows, mainly in
High Performance Computing
High-performance computing (HPC) is the use of supercomputers and computer clusters to solve advanced computation problems.
Overview
HPC integrates systems administration (including network and security knowledge) and parallel programming into ...
. In this way, Guix would offer a way to share a reproducible computational environment, i.e. Guix using a recipe for the particular scientific software/environment would provide all the information needed to uniquely describe the dependency tree to build and run that software. 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 not sufficient 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.
History
The project was started in June 2012 by Ludovic Courtès, one of the GNU Guile hackers.
The
GNU Project
The GNU Project ( ) is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and Computer hardware, computing dev ...
announced in November 2012 the first release of GNU Guix, a functional package manager based on
Nix that provides, among other things,
Guile Scheme APIs.
On August 20, 2015, it was announced that Guix had been ported to
GNU Hurd.
Releases
The project has no fixed release schedule and has until now released approximately every 6 months.
There are plans for an upcoming 1.5.0 release since there is an over two year gap since the 1.4.0 release.
The project migrated away from
GNU Savannah to
Codeberg on May 25th 2025.
Version history
See also
*
Debian GNU/Hurd
Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
*
NixOS – A similar operating system, which inspired GNU Guix
*
Comparison of Linux distributions
Technical variations of Linux distributions include support for different hardware devices and systems or software package configurations. Organizational differences may be motivated by historical reasons. Other criteria include security, includi ...
References
External links
*
*
List of Guix packages
{{Linux distributions
Guix
Free package management systems
Free software programmed in Lisp
Functional programming
GNU Project software
Linux package management-related software
Linux distributions without systemd
Software using the GNU General Public License