Commit | Line | Data |
---|---|---|
568717fd LC |
1 | \input texinfo |
2 | @c -*-texinfo-*- | |
3 | ||
4 | @c %**start of header | |
5 | @setfilename guix.info | |
6 | @documentencoding UTF-8 | |
7 | @settitle Guix Reference Manual | |
8 | @c %**end of header | |
9 | ||
10 | @include version.texi | |
11 | ||
12 | @ifinfo | |
13 | @dircategory Development | |
14 | @direntry | |
15 | * guix: (guix). Guix, the functional package manager. | |
16 | * guix-build: (guix)Invoking guix-build | |
17 | Building packages with Guix. | |
18 | @end direntry | |
19 | @end ifinfo | |
20 | ||
21 | @titlepage | |
22 | @title{Guix Reference Manual} | |
23 | @subtitle{Using the Guix Functional Package Manager} | |
24 | @author Ludovic Courtès | |
25 | ||
26 | @page | |
27 | @vskip 0pt plus 1filll | |
28 | Edition @value{EDITION} @* | |
29 | @value{UPDATED} @* | |
30 | ||
31 | Copyright @copyright{} 2012 Ludovic Court@`es | |
32 | ||
33 | @quotation | |
34 | Permission is granted to copy, distribute and/or modify this document | |
35 | under the terms of the GNU Free Documentation License, Version 1.3 or | |
36 | any later version published by the Free Software Foundation; with no | |
37 | Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A | |
38 | copy of the license is included in the section entitled ``GNU Free | |
39 | Documentation License''. | |
40 | @end quotation | |
41 | @end titlepage | |
42 | ||
43 | @copying | |
44 | This manual documents Guix version @value{VERSION}. | |
45 | ||
46 | Copyright (C) 2012 Ludovic Courtès | |
47 | ||
48 | Permission is granted to copy, distribute and/or modify this document | |
49 | under the terms of the GNU Free Documentation License, Version 1.3 or | |
50 | any later version published by the Free Software Foundation; with no | |
51 | Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A | |
52 | copy of the license is included in the section entitled ``GNU Free | |
53 | Documentation License.'' | |
54 | @end copying | |
55 | ||
56 | @contents | |
57 | ||
58 | @c ********************************************************************* | |
59 | @node Top | |
60 | @top Guix | |
61 | ||
62 | This document describes Guix version @value{VERSION}. | |
63 | ||
64 | @menu | |
65 | * Introduction:: What is Guix about? | |
66 | * Programming Interface:: Using Guix in Scheme. | |
67 | * Utilities:: Package management commands. | |
68 | ||
69 | * Acknowledgments:: Thanks! | |
70 | * GNU Free Documentation License:: The license of this manual. | |
71 | * Concept Index:: Concepts. | |
72 | * Function Index:: Functions. | |
73 | @end menu | |
74 | ||
75 | @c ********************************************************************* | |
76 | @node Introduction | |
77 | @chapter Introduction | |
78 | ||
79 | Guix is a functional package management tool. Package management | |
80 | consists in all the activities that relate to building packages from | |
81 | source, honoring the build-time and run-time dependencies on packages, | |
82 | installing packages in user environments, upgrading installed packages | |
83 | to new versions or rolling back to a previous set, removing unused | |
84 | software packages, etc. | |
85 | ||
86 | @cindex functional package management | |
87 | The term @dfn{functional} refers to a specific package management | |
88 | discipline. In Guix, the package build and installation process is seen | |
89 | as a function, in the mathematical sense: that function takes inputs, | |
90 | such as build scripts, a compiler, and libraries depended on, and | |
91 | returns the installed package. As a pure function, its result depends | |
92 | solely on its inputs---for instance, it cannot refer to software or | |
93 | scripts that were not explicitly passed as inputs. A build function | |
94 | always produces the same result when passed a given set of inputs. Last | |
95 | but not least, a build function cannot alter the system's environment in | |
96 | any way; for instance, it cannot create, modify, or delete files outside | |
97 | of its build and installation directories. This is achieved by running | |
98 | build processes in dedicated ``chroots'', where only their explicit | |
99 | inputs are visible. | |
100 | ||
101 | @cindex package store | |
102 | The result of package build functions is @dfn{cached} in the file | |
103 | system, in a special directory called the @dfn{package store}. In | |
104 | practice, each package is installed in a directory of its own, in the | |
105 | store---by default under @file{/nix/store}. The directory name contains | |
106 | a hash of all the inputs used to build that package; thus, changing an | |
107 | input yields a different directory name. | |
108 | ||
109 | This approach is the foundation of Guix's salient features: support for | |
110 | transactional package upgrades and rollback, per-user installation, and | |
111 | garbage collection of packages. | |
112 | ||
113 | Guix has a command-line interface allowing users to build, install, | |
114 | upgrade, and remove packages, as well as a Scheme programming interface. | |
115 | The remainder of this manual describes them. | |
116 | ||
117 | @c ********************************************************************* | |
118 | @node Programming Interface | |
119 | @chapter Programming Interface | |
120 | ||
121 | @menu | |
122 | * Defining Packages:: Defining new packages. | |
123 | * The Store:: Manipulating the package store. | |
124 | * Derivations:: Low-level interface to package derivations. | |
125 | @end menu | |
126 | ||
127 | @node Defining Packages | |
128 | @section Defining Packages | |
129 | ||
130 | @code{(guix packages)} and @code{(guix build-system)} | |
131 | ||
132 | @node The Store | |
133 | @section The Store | |
134 | ||
135 | @code{(guix store)} | |
136 | ||
137 | @node Derivations | |
138 | @section Derivations | |
139 | ||
140 | @code{(guix derivations)} | |
141 | ||
142 | @c ********************************************************************* | |
143 | @node Utilities | |
144 | @chapter Utilities | |
145 | ||
146 | @menu | |
147 | * Invoking guix-build:: Building packages from the command line. | |
148 | @end menu | |
149 | ||
150 | @node Invoking guix-build | |
151 | @section Invoking @command{guix-build} | |
152 | ||
153 | @c ********************************************************************* | |
154 | @node Acknowledgments | |
155 | @chapter Acknowledgments | |
156 | ||
157 | Guix is based on the Nix package manager, which was designed and | |
158 | implemented by Eelco Dolstra. Nix pioneered functional package | |
159 | management, and promoted unprecedented features, such as transactional | |
160 | package upgrades and rollbacks, per-user profiles, and referentially | |
161 | transparent build processes. Without this work, Guix would not exist. | |
162 | ||
163 | The Nix-based software distributions, Nixpkgs and NixOS, have also been | |
164 | an inspiration for Guix. | |
165 | ||
166 | @c ********************************************************************* | |
167 | @node GNU Free Documentation License | |
168 | @appendix GNU Free Documentation License | |
169 | ||
170 | @include fdl-1.3.texi | |
171 | ||
172 | @c ********************************************************************* | |
173 | @node Concept Index | |
174 | @unnumbered Concept Index | |
175 | @printindex cp | |
176 | ||
177 | @node Function Index | |
178 | @unnumbered Function Index | |
179 | @printindex fn | |
180 | ||
181 | @bye | |
182 | ||
183 | @c Local Variables: | |
184 | @c ispell-local-dictionary: "american"; | |
185 | @c End: |