Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
6.2 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. -*- mode: org -*-
  2. [[http://www.gnu.org/software/guix/][GNU Guix]] (IPA: /ɡiːks/) is a purely functional package manager, and
  3. associated free software distribution, for the [[http://www.gnu.org/gnu/gnu.html][GNU system]]. In addition
  4. to standard package management features, Guix supports transactional
  5. upgrades and roll-backs, unprivileged package management, per-user
  6. profiles, and garbage collection.
  7. It provides [[http://www.gnu.org/software/guile/][Guile]] Scheme APIs, including a high-level embedded
  8. domain-specific languages (EDSLs) to describe how packages are to be
  9. built and composed.
  10. A user-land free software distribution for GNU/Linux comes as part of
  11. Guix.
  12. Guix is based on the [[http://nixos.org/nix/][Nix]] package manager.
  13. * Requirements
  14. GNU Guix currently depends on the following packages:
  15. - [[http://gnu.org/software/guile/][GNU Guile 2.0.x]], version 2.0.5 or later
  16. - [[http://gnupg.org/][GNU libgcrypt]]
  17. Unless `--disable-daemon' was passed, the following packages are needed:
  18. - [[http://sqlite.org/][SQLite 3]]
  19. - [[http://www.bzip.org][libbz2]]
  20. - [[http://gcc.gnu.org][GCC's g++]]
  21. When `--disable-daemon' was passed, you instead need the following:
  22. - [[http://nixos.org/nix/][Nix]]
  23. * Installation
  24. See the manual for the installation instructions, either by running
  25. info -f doc/guix.info "(guix) Installation"
  26. or by checking the [[http://www.gnu.org/software/guix/manual/guix.html#Installation][web copy of the manual]].
  27. For information on installation from a Git checkout, please see the ‘HACKING’
  28. file.
  29. * Installing Guix from Guix
  30. You can re-build and re-install Guix using a system that already runs Guix.
  31. To do so:
  32. - Install the dependencies (see 'Requirements' above) and build tools using
  33. Guix:
  34. guix package --install={autoconf,automake,bzip2,gcc,binutils,ld-wrapper,glibc,gettext,guile,libgcrypt,pkg-config,sqlite}
  35. - set the environment variables that Guix recommends you to set during the
  36. package installation process:
  38. - set the PATH environment variable to refer to the profile:
  39. PATH=$HOME/.guix-profile/bin:$PATH
  40. - re-run the configure script passing it the option
  41. `--with-libgcrypt-prefix=$HOME/.guix-profile/'
  42. - run "make" and "make install"
  43. * How It Works
  44. Guix does the high-level preparation of a /derivation/. A derivation is
  45. the promise of a build; it is stored as a text file under
  46. =/nix/store/xxx.drv=. The (guix derivations) module provides the
  47. `derivation' primitive, as well as higher-level wrappers such as
  48. `build-expression->derivation'.
  49. Guix does remote procedure calls (RPCs) to the Guix or Nix daemon (the
  50. =guix-daemon= or =nix-daemon= command), which in turn performs builds
  51. and accesses to the Nix store on its behalf. The RPCs are implemented
  52. in the (guix store) module.
  53. * Installing Guix as non-root
  54. The Guix daemon allows software builds to be performed under alternate
  55. user accounts, which are normally created specifically for this
  56. purpose. For instance, you may have a pool of accounts in the
  57. =guixbuild= group, and then you can instruct =guix-daemon= to use them
  58. like this:
  59. $ guix-daemon --build-users-group=guixbuild
  60. However, unless it is run as root, =guix-daemon= cannot switch users.
  61. In that case, it falls back to using a setuid-root helper program call
  62. =nix-setuid-helper=. That program is not setuid-root by default when
  63. you install it; instead you should run a command along these lines
  64. (assuming Guix is installed under /usr/local):
  65. # chown root.root /usr/local/libexec/nix-setuid-helper
  66. # chmod 4755 /usr/local/libexec/nix-setuid-helper
  67. * Contact
  68. GNU Guix is hosted at https://savannah.gnu.org/projects/guix/.
  69. Please email <bug-guix@gnu.org> for bug reports or questions regarding
  70. Guix and its distribution; email <gnu-system-discuss@gnu.org> for
  71. general issues regarding the GNU system.
  72. Join #guix on irc.freenode.net.
  73. * Guix & Nix
  74. GNU Guix is based on [[http://nixos.org/nix/][the Nix package manager]]. It implements the same
  75. package deployment paradigm, and in fact it reuses some of its code.
  76. Yet, different engineering decisions were made for Guix, as described
  77. below.
  78. Nix is really two things: a package build tool, implemented by a library
  79. and daemon, and a special-purpose programming language. GNU Guix relies
  80. on the former, but uses Scheme as a replacement for the latter.
  81. Using Scheme instead of a specific language allows us to get all the
  82. features and tooling that come with Guile (compiler, debugger, REPL,
  83. Unicode, libraries, etc.) And it means that we have a general-purpose
  84. language, on top of which we can have embedded domain-specific languages
  85. (EDSLs), such as the one used to define packages. This broadens what
  86. can be done in package recipes themselves, and what can be done around them.
  87. Technically, Guix makes remote procedure calls to the ‘nix-worker’
  88. daemon to perform operations on the store. At the lowest level, Nix
  89. “derivations” represent promises of a build, stored in ‘.drv’ files in
  90. the store. Guix produces such derivations, which are then interpreted
  91. by the daemon to perform the build. Thus, Guix derivations can use
  92. derivations produced by Nix (and vice versa).
  93. With Nix and the [[http://nixos.org/nixpkgs][Nixpkgs]] distribution, package composition happens at
  94. the Nix language level, but builders are usually written in Bash.
  95. Conversely, Guix encourages the use of Scheme for both package
  96. composition and builders. Likewise, the core functionality of Nix is
  97. written in C++ and Perl; Guix relies on some of the original C++ code,
  98. but exposes all the API as Scheme.
  99. * Related software
  100. - [[http://nixos.org][Nix, Nixpkgs, and NixOS]], functional package manager and associated
  101. software distribution, are the inspiration of Guix
  102. - [[http://www.gnu.org/software/stow/][GNU Stow]] builds around the idea of one directory per prefix, and a
  103. symlink tree to create user environments
  104. - [[http://www.pvv.ntnu.no/~arnej/store/storedoc_6.html][STORE]] shares the same idea
  105. - [[https://live.gnome.org/OSTree/][GNOME's OSTree]] allows bootable system images to be built from a
  106. specified set of packages
  107. - The [[http://www.gnu.org/s/gsrc/][GNU Source Release Collection]] (GSRC) is a user-land software
  108. distribution; unlike Guix, it relies on core tools available on the
  109. host system