Guix
   HOME

TheInfoList



OR:

GNU Guix () is a
functional Functional may refer to: * Movements in architecture: ** Functionalism (architecture) ** Form follows function * Functional group, combination of atoms within molecules * Medical conditions without currently visible organic basis: ** Functional sy ...
cross-platform package manager and a tool to instantiate and manage
Unix-like A Unix-like (sometimes referred to as UN*X 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 Unix-li ...
operating systems, based on the
Nix package manager Nix is a cross-platform package manager that utilizes a purely functional deployment model where software is installed into unique directories generated through cryptographic hashes. It is also the name of the tool's programming language. A pac ...
. Configuration and package recipes are written in Guile Scheme. GNU Guix is the default package manager of the
GNU Guix System GNU Guix System or Guix System (previously ''GuixSD'') is a rolling release, free and open source Linux distribution built around the GNU Guix package manager. It enables a declarative operating system configuration and allows reliable system ...
distribution Distribution may refer to: Mathematics *Distribution (mathematics), generalized functions used to formulate solutions of partial differential equations * Probability distribution, the probability of a particular value or value range of a vari ...
. Differing from traditional package managers, Guix (like Nix) utilizes a purely
functional Functional may refer to: * Movements in architecture: ** Functionalism (architecture) ** Form follows function * Functional group, combination of atoms within molecules * Medical conditions without currently visible organic basis: ** Functional sy ...
deployment model where software is installed into unique directories generated through cryptographic hashes. All dependencies for each software are included within 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 have d ...
, allows multiple versions of the same software to coexist and makes packages portable and
reproducible Reproducibility, also known as replicability and repeatability, is a major principle underpinning the scientific method. For the findings of a study to be reproducible means that results obtained by an experiment or an observational study or in a ...
. Performing scientific computations in a Guix setup has been proposed as a promising response to the replication crisis. The development of GNU Guix is intertwined with the
GNU Guix System GNU Guix System or Guix System (previously ''GuixSD'') is a rolling release, free and open source Linux distribution built around the GNU Guix package manager. It enables a declarative operating system configuration and allows reliable system ...
, an installable operating system distribution using the Linux-libre kernel and
GNU Shepherd GNU Guix System or Guix System (previously ''GuixSD'') is a rolling release, Free software, free and open source Linux distribution, Linux distribution built around the GNU Guix package manager. It enables a declarative operating system config ...
init system.


General features

Guix packages are defined through
functional Functional may refer to: * Movements in architecture: ** Functionalism (architecture) ** Form follows function * Functional group, combination of atoms within molecules * Medical conditions without currently visible organic basis: ** Functional sy ...
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 Garbage, trash, rubbish, or refuse is waste material that is discarded by humans, usually due to a perceived lack of utility. The term generally does not encompass bodily waste products, purely liquid or gaseous wastes, or toxic waste produ ...
when no other package depends on them. At the cost of greater storage requirements, all upgrades in Guix are guaranteed to be both atomic and can be rolled back. The roll-back feature of Guix is inherited from the design of Nix and is not found in any of the native package managers of popular Linux distributions such as
Debian Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of D ...
and its derivatives, Arch Linux and its derivatives, or in other major distributions such as Fedora, CentOS or OpenSUSE. The Guix package manager can however be used in such distributions and is available for Debian and Parabola. 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 solutions (like Docker) that are also commonly employed to solve dependency hell, 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 software patterns, replacing it with abstractions or using data normalization to avoid redundancy. The DRY principle is stated as "Every piece o ...
and
Single source of truth In information science and information technology, single source of truth (SSOT) architecture, or single point of truth (SPOT) architecture, for information systems is the practice of structuring information models and associated data schemas su ...
. 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 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: (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 easily hackable.


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. E.g. 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. E.g. on version c087a90e06d7b9451f802323e24deb1862a21e0f of guix, this corresponds to the following 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'' in the filesystem.


Multiple user profiles

The user can create any number of profiles by invoking ''guix 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.


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'').


Environment

Guix environment enables the user to easily enter an environment where all the necessary packages for development of software are present without clogging up the users default profile with dependencies for multiple projects. E.g. running ''guix environment hello'' enters a throw-away environment where everything needed to compile ''hello'' on guix is present (gcc, guile, etc.).


Persistent development environment

If you want a persistent gc-rooted environment that is not garbage collected on the next run of guix gc you can create a root: E.g. running ''guix environment --root=hello-root hello'' 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 a docker binary image, a relocatable tarball or a squashfs binary.


Graph

Guix graph enables the user to view different graphs of the packages and their dependencies.


Guix System (operating system)

GNU Guix System GNU Guix System or Guix System (previously ''GuixSD'') is a rolling release, free and open source Linux distribution built around the GNU Guix package manager. It enables a declarative operating system configuration and allows reliable system ...
uses Guix as its package manager and configuration system, similar to how
NixOS NixOS is a Linux distribution built on top of the Nix package manager. It uses declarative configuration and allows reliable system upgrades. Several official package "channels" are offered, including the current Stable release and the Unstable ...
uses
Nix Nix or NIX may refer to: Places * Nix, Alabama, an unincorporated community, United States * Nix, Texas, a ghost town in southwestern Lampasas County, Texas, United States * Nix (moon), a moon of Pluto People * Nix (surname), listing people with ...
.


History

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 computing devices by collaborati ...
announced in November 2012 the first release of GNU Guix, a functional package manager based on
Nix Nix or NIX may refer to: Places * Nix, Alabama, an unincorporated community, United States * Nix, Texas, a ghost town in southwestern Lampasas County, Texas, United States * Nix (moon), a moon of Pluto People * Nix (surname), listing people with ...
that provides, among other things, Guile
Scheme A scheme is a systematic plan for the implementation of a certain idea. Scheme or schemer may refer to: Arts and entertainment * ''The Scheme'' (TV series), a BBC Scotland documentary series * The Scheme (band), an English pop band * ''The Schem ...
APIs. The project was started in June 2012 by Ludovic Courtès, one of the GNU Guile hackers. On August 20, 2015, it was announced that Guix had been ported to
GNU Hurd GNU Hurd is a collection of microkernel servers written as part of GNU, for the GNU Mach microkernel. It has been under development since 1990 by the GNU Project of the Free Software Foundation, designed as a replacement for the Unix kernel, and ...
.


Releases

The project has no fixed release schedule and has until now released approximately every 6 months.


See also

*
GNU Guix System GNU Guix System or Guix System (previously ''GuixSD'') is a rolling release, free and open source Linux distribution built around the GNU Guix package manager. It enables a declarative operating system configuration and allows reliable system ...
* Debian GNU/Hurd * Comparison of Linux distributions *
NixOS NixOS is a Linux distribution built on top of the Nix package manager. It uses declarative configuration and allows reliable system upgrades. Several official package "channels" are offered, including the current Stable release and the Unstable ...
– A similar operating system, which inspired GNU Guix


References


External links

* *
List of Guix packages
{{Linux distributions
Guix GNU Guix () is a functional cross-platform package manager and a tool to instantiate and manage Unix-like operating systems, based on the Nix package manager. Configuration and package recipes are written in Guile Scheme. GNU Guix is the default ...
GNU Project Free package management systems Free software programmed in Lisp Functional programming GNU Project software Linux package management-related software