Next: , Previous: , Up: Package Management   [Contents][Index]


3.4 Packages with Multiple Outputs

Often, packages defined in Guix have a single output—i.e., the source package leads exactly one directory in the store. When running guix package -i glibc, one installs the default output of the GNU libc package; the default output is called out, but its name can be omitted as shown in this command. In this particular case, the default output of glibc contains all the C header files, shared libraries, static libraries, Info documentation, and other supporting files.

Sometimes it is more appropriate to separate the various types of files produced from a single source package into separate outputs. For instance, the GLib C library (used by GTK+ and related packages) installs more than 20 MiB of reference documentation as HTML pages. To save space for users who do not need it, the documentation goes to a separate output, called doc. To install the main GLib output, which contains everything but the documentation, one would run:

guix package -i glib

The command to install its documentation is:

guix package -i glib:doc

Some packages install programs with different “dependency footprints”. For instance, the WordNet package install both command-line tools and graphical user interfaces (GUIs). The former depend solely on the C library, whereas the latter depend on Tcl/Tk and the underlying X libraries. In this case, we leave the command-line tools in the default output, whereas the GUIs are in a separate output. This allows users who do not need the GUIs to save space.

There are several such multiple-output packages in the GNU distribution. Other conventional output names include lib for libraries and possibly header files, bin for stand-alone programs, and debug for debugging information (see Installing Debugging Files). The outputs of a packages are listed in the third column of the output of guix package --list-available (see Invoking guix package).


Next: , Previous: , Up: Package Management   [Contents][Index]