Difference between revisions of "Guix"

From ArchWiki
Jump to navigation Jump to search
m (→‎Running: # type e.g. 10 for ''n'' below --> have ten users)
Line 19: Line 19:
  # groupadd --system guixbuild
  # groupadd --system guixbuild
  # type e.g.  10  for  ''n'' below  -->  have ten users   
  # uncomment and type e.g.  10  for  ''n'' below  -->  have ten users   
  # for i in `seq -w 1 ''n''`;
  # for i in `seq -w 1 ''n''`;

Revision as of 18:04, 8 October 2017

Warning: Guix is not the official package manager of Arch. It is also still under heavy development. Some packages may currently fail to build on Arch.

GNU Guix is a package manager that offers transactional, reproducible, per-user package management. While Guix can be used stand-alone and provide a full GNU distribution and a kernel by itself, you can install the Guix package manager on top of Arch to make Guix available to users while using a more traditional and mature Unix-like system as a base.

See the Guix manual for information on what per-user packaging commands Guix makes available to users.


Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: The Guix reference manual says nscd.service should be enabled but it is not clear if nscd works properly on Arch or if it is even required. (Discuss in Talk:Guix#)
Note: The build check currently fails if /bin/sh is not a link to bash, which is not a problem on a default Arch installation.

GNU Guix is available in the AUR as guixAUR. As described in the PKGBUILD, the PGP key by the Guix distributor will need to be added first.


Guix makes builds more reproducible by running the build process using an unprivileged build user account. Therefore if you want to be able to build n packages simultaneously (e.g. for serving multiple users at the same time) you should create n build user accounts. as Guix should be able to build simultaneously. The following command does this the way described in Guix manual:

# groupadd --system guixbuild
# uncomment and type e.g.  10  for   n below  -->  have ten users  
# for i in `seq -w 1 n`;
    useradd -g guixbuild -G guixbuild           \
            -d /var/empty -s `which nologin`    \
            -c "Guix build user $i" --system    \

Start and enable guix-daemon.service.

You may want to authorize Guix to download and use binary packages (‘substitutes’) from Hydra:

# guix archive --authorize < /usr/share/guix/hydra.gnu.org.pub

Building packages outside of /tmp

The unit file may need to be extended to use a different TMPDIR for building if /tmp does not provide enough space (see the Guix manual for details). To use /tmpdir for building instead of /tmp, run

# systemctl edit guix-daemon.service

to add the following lines:


Uninstalling Guix

Disable guix-daemon.service and then remove Guix using pacman. Now remove all the Guix build users and their group:

# for i in `seq -w 1 n`; do userdel guixbuilder$i; done
# groupdel guixbuild

Then remove the Guix store /gnu as well as /var/guix and /var/log/guix. If you edited guix-daemon.service, you may want to remove /etc/systemd/system/guix-daemon.service.d as well.