doc: Add the stub of a manual.
[jackhill/guix/guix.git] / doc / guix.texi
CommitLineData
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
28Edition @value{EDITION} @*
29@value{UPDATED} @*
30
31Copyright @copyright{} 2012 Ludovic Court@`es
32
33@quotation
34Permission is granted to copy, distribute and/or modify this document
35under the terms of the GNU Free Documentation License, Version 1.3 or
36any later version published by the Free Software Foundation; with no
37Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
38copy of the license is included in the section entitled ``GNU Free
39Documentation License''.
40@end quotation
41@end titlepage
42
43@copying
44This manual documents Guix version @value{VERSION}.
45
46Copyright (C) 2012 Ludovic Courtès
47
48Permission is granted to copy, distribute and/or modify this document
49under the terms of the GNU Free Documentation License, Version 1.3 or
50any later version published by the Free Software Foundation; with no
51Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
52copy of the license is included in the section entitled ``GNU Free
53Documentation License.''
54@end copying
55
56@contents
57
58@c *********************************************************************
59@node Top
60@top Guix
61
62This 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
79Guix is a functional package management tool. Package management
80consists in all the activities that relate to building packages from
81source, honoring the build-time and run-time dependencies on packages,
82installing packages in user environments, upgrading installed packages
83to new versions or rolling back to a previous set, removing unused
84software packages, etc.
85
86@cindex functional package management
87The term @dfn{functional} refers to a specific package management
88discipline. In Guix, the package build and installation process is seen
89as a function, in the mathematical sense: that function takes inputs,
90such as build scripts, a compiler, and libraries depended on, and
91returns the installed package. As a pure function, its result depends
92solely on its inputs---for instance, it cannot refer to software or
93scripts that were not explicitly passed as inputs. A build function
94always produces the same result when passed a given set of inputs. Last
95but not least, a build function cannot alter the system's environment in
96any way; for instance, it cannot create, modify, or delete files outside
97of its build and installation directories. This is achieved by running
98build processes in dedicated ``chroots'', where only their explicit
99inputs are visible.
100
101@cindex package store
102The result of package build functions is @dfn{cached} in the file
103system, in a special directory called the @dfn{package store}. In
104practice, each package is installed in a directory of its own, in the
105store---by default under @file{/nix/store}. The directory name contains
106a hash of all the inputs used to build that package; thus, changing an
107input yields a different directory name.
108
109This approach is the foundation of Guix's salient features: support for
110transactional package upgrades and rollback, per-user installation, and
111garbage collection of packages.
112
113Guix has a command-line interface allowing users to build, install,
114upgrade, and remove packages, as well as a Scheme programming interface.
115The 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
157Guix is based on the Nix package manager, which was designed and
158implemented by Eelco Dolstra. Nix pioneered functional package
159management, and promoted unprecedented features, such as transactional
160package upgrades and rollbacks, per-user profiles, and referentially
161transparent build processes. Without this work, Guix would not exist.
162
163The Nix-based software distributions, Nixpkgs and NixOS, have also been
164an 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: