Next: , Previous: , Up: GNU Distribution   [Contents][Index]


6.2 Package Modules

From a programming viewpoint, the package definitions of the GNU distribution are provided by Guile modules in the (gnu packages …) name space9 (see Guile modules in GNU Guile Reference Manual). For instance, the (gnu packages emacs) module exports a variable named emacs, which is bound to a <package> object (see Defining Packages).

The (gnu packages …) module name space is special: it is automatically scanned for packages by the command-line tools. For instance, when running guix package -i emacs, all the (gnu packages …) modules are scanned until one that exports a package object whose name is emacs is found. This package search facility is implemented in the (gnu packages) module.

Users can store package definitions in modules with different names—e.g., (my-packages emacs). In that case, commands such as guix package and guix build have to be used with the -e option so that they know where to find the package.

The distribution is fully bootstrapped and self-contained: each package is built based solely on other packages in the distribution. The root of this dependency graph is a small set of bootstrap binaries, provided by the (gnu packages bootstrap) module. For more information on bootstrapping, Bootstrapping.


Footnotes

(9)

Note that packages under the (gnu packages …) module name space are not necessarily “GNU packages”. This module naming scheme follows the usual Guile module naming convention: gnu means that these modules are distributed as part of the GNU system, and packages identifies modules that define packages.