Commit | Line | Data |
---|---|---|
4255d4e3 LC |
1 | -*- mode: org -*- |
2 | ||
a65e3306 LC |
3 | [[http://www.gnu.org/software/guix/][GNU Guix]] is a purely functional package manager, and associated free |
4 | software distribution, for the [[http://www.gnu.org/gnu/gnu.html][GNU system]]. In addition to standard | |
5 | package management features, Guix supports transactional upgrades and | |
6 | roll-backs, unprivileged package management, per-user profiles, and | |
7 | garbage collection. | |
b7a7f598 | 8 | |
a65e3306 LC |
9 | It provides [[http://www.gnu.org/software/guile/][Guile]] Scheme APIs, including a high-level embedded |
10 | domain-specific languages (EDSLs) to describe how packages are to be | |
11 | built and composed. | |
b7a7f598 | 12 | |
a65e3306 LC |
13 | A user-land free software distribution for GNU/Linux comes as part of |
14 | Guix. | |
15 | ||
16 | Guix is based on the [[http://nixos.org/nix/][Nix]] package manager. | |
4255d4e3 LC |
17 | |
18 | ||
19 | * Hacking | |
20 | ||
a65e3306 | 21 | GNU Guix currently depends on the following packages: |
4255d4e3 | 22 | |
a1e4a936 LC |
23 | - [[http://gnu.org/software/guile/][GNU Guile 2.0.x]] |
24 | - [[http://nixos.org/nix/][Nix]] | |
d388c2c4 | 25 | - [[http://gnupg.org/][GNU libgcrypt]] |
4255d4e3 | 26 | |
e76bdf8b | 27 | Optionally, packages from Nixpkgs may be transparently reused from Guix. |
7da7ae93 LC |
28 | For this to work, you need to have a checkout of the Nixpkgs repository; |
29 | the `--with-nixpkgs' option allows you to let `configure' know where the | |
30 | Nixpkgs checkout is. | |
4255d4e3 | 31 | |
a1e4a936 | 32 | - [[http://nixos.org/nixpkgs/][Nixpkgs]] |
4255d4e3 | 33 | |
7da7ae93 LC |
34 | When building Guix from a checkout, the following packages are also |
35 | required: | |
36 | ||
37 | - [[http://www.gnu.org/software/autoconf/][GNU Autoconf]] | |
38 | - [[http://www.gnu.org/software/automake/][GNU Automake]] | |
39 | - [[http://www.gnu.org/software/gettext/][GNU Gettext]] | |
40 | ||
41 | The "autoreconf -vi" command can be used to generate the build system | |
42 | infrastructure; it reports an error if an inappropriate version of the | |
43 | above packages is being used. | |
44 | ||
4255d4e3 LC |
45 | * How It Works |
46 | ||
47 | Guix does the high-level preparation of a /derivation/. A derivation is | |
48 | the promise of a build; it is stored as a text file under | |
49 | =/nix/store/xxx.drv=. The (guix derivations) module provides the | |
50 | `derivation' primitive, as well as higher-level wrappers such as | |
51 | `build-expression->derivation'. | |
52 | ||
53 | Guix does remote procedure calls (RPCs) to the Nix daemon (the | |
54 | =nix-worker --daemon= command), which in turn performs builds and | |
55 | accesses to the Nix store on its behalf. The RPCs are implemented in | |
56 | the (guix store) module. | |
57 | ||
58 | * Contact | |
59 | ||
a65e3306 LC |
60 | GNU Guix is hosted at https://savannah.gnu.org/projects/guix/. |
61 | ||
62 | Please email <bug-guix@gnu.org> for bug reports or questions regarding | |
63 | Guix and its distribution; email <gnu-system-discuss@gnu.org> for | |
64 | general issues regarding the GNU system. | |
65 | ||
66 | Join #guix on irc.freenode.net. | |
67 | ||
68 | * Guix & Nix | |
69 | ||
70 | GNU Guix is based on [[http://nixos.org/nix/][the Nix package manager]]. It implements the same | |
71 | package deployment paradigm, and in fact it reuses some of its code. | |
72 | Yet, different engineering decisions were made for Guix, as described | |
73 | below. | |
74 | ||
75 | Nix is really two things: a package build tool, implemented by a library | |
76 | and daemon, and a special-purpose programming language. GNU Guix relies | |
77 | on the former, but uses Scheme as a replacement for the latter. | |
78 | ||
79 | Using Scheme instead of a specific language allows us to get all the | |
80 | features and tooling that come with Guile (compiler, debugger, REPL, | |
81 | Unicode, libraries, etc.) And it means that we have a general-purpose | |
82 | language, on top of which we can have embedded domain-specific languages | |
83 | (EDSLs), such as the one used to define packages. This broadens what | |
84 | can be done in package recipes themselves, and what can be done around them. | |
85 | ||
86 | Technically, Guix makes remote procedure calls to the ‘nix-worker’ | |
87 | daemon to perform operations on the store. At the lowest level, Nix | |
88 | “derivations” represent promises of a build, stored in ‘.drv’ files in | |
89 | the store. Guix produces such derivations, which are then interpreted | |
90 | by the daemon to perform the build. Thus, Guix derivations can use | |
91 | derivations produced by Nix (and vice versa). | |
92 | ||
93 | With Nix and the [[http://nixos.org/nixpkgs][Nixpkgs]] distribution, package composition happens at | |
94 | the Nix language level, but builders are usually written in Bash. | |
95 | Conversely, Guix encourages the use of Scheme for both package | |
96 | composition and builders. Likewise, the core functionality of Nix is | |
97 | written in C++ and Perl; Guix relies on some of the original C++ code, | |
98 | but exposes all the API as Scheme. | |
d38487e9 LC |
99 | |
100 | * Related software | |
101 | ||
102 | - [[http://nixos.org][Nix, Nixpkgs, and NixOS]], functional package manager and associated | |
103 | software distribution, are the inspiration of Guix | |
104 | - [[http://www.gnu.org/software/stow/][GNU Stow]] builds around the idea of one directory per prefix, and a | |
105 | symlink tree to create user environments | |
106 | - [[http://www.pvv.ntnu.no/~arnej/store/storedoc_6.html][STORE]] shares the same idea | |
107 | - [[https://live.gnome.org/OSTree/][GNOME's OSTree]] allows bootable system images to be built from a | |
108 | specified set of packages | |
109 | - The [[http://www.gnu.org/s/gsrc/][GNU Source Release Collection]] (GSRC) is a user-land software | |
110 | distribution; unlike Guix, it relies on core tools available on the | |
111 | host system |