README 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. -*- mode: org -*-
  2. [[https://www.gnu.org/software/guix/][GNU Guix]] (IPA: /ɡiːks/) is a purely functional package manager, and
  3. associated free software distribution, for the [[https://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 [[https://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. GNU Guix can be used on top of an already-installed GNU/Linux distribution, or
  11. it can be used standalone (we call that “Guix System”).
  12. Guix is based on the [[https://nixos.org/nix/][Nix]] package manager.
  13. * Requirements
  14. GNU Guix currently depends on the following packages:
  15. - [[https://gnu.org/software/guile/][GNU Guile 2.2.x]]
  16. - [[https://notabug.org/cwebber/guile-gcrypt][Guile-Gcrypt]] 0.1.0 or later
  17. - [[https://www.gnu.org/software/make/][GNU Make]]
  18. - [[https://www.gnutls.org][GnuTLS]] compiled with guile support enabled
  19. - [[https://notabug.org/guile-sqlite3/guile-sqlite3][Guile-SQLite3]], version 0.1.0 or later
  20. - [[https://gitlab.com/guile-git/guile-git][Guile-Git]]
  21. - [[http://www.zlib.net/][zlib]]
  22. - [[https://savannah.nongnu.org/projects/guile-json/][Guile-JSON]]
  23. Unless `--disable-daemon' was passed, the following packages are needed:
  24. - [[https://gnupg.org/][GNU libgcrypt]]
  25. - [[https://sqlite.org/][SQLite 3]]
  26. - [[https://gcc.gnu.org][GCC's g++]]
  27. - optionally [[http://www.bzip.org][libbz2]]
  28. When `--disable-daemon' was passed, you instead need the following:
  29. - [[https://nixos.org/nix/][Nix]]
  30. * Installation
  31. See the manual for the installation instructions, either by running
  32. info -f doc/guix.info "Installation"
  33. or by checking the [[https://www.gnu.org/software/guix/manual/guix.html#Installation][web copy of the manual]].
  34. For information on installation from a Git checkout, please see the section
  35. "Building from Git" in the manual.
  36. * Installing Guix from Guix
  37. You can re-build and re-install Guix using a system that already runs Guix.
  38. To do so:
  39. - Start a shell with the development environment for Guix:
  40. guix environment guix
  41. - Re-run the 'configure' script passing it the option
  42. '--localstatedir=/somewhere', where '/somewhere' is the 'localstatedir'
  43. value of the currently installed Guix (failing to do that would lead the
  44. new Guix to consider the store to be empty!). We recommend to use the
  45. value '/var'.
  46. - Run "make", "make check", and "make install".
  47. * How It Works
  48. Guix does the high-level preparation of a /derivation/. A derivation is
  49. the promise of a build; it is stored as a text file under
  50. =/gnu/store/xxx.drv=. The (guix derivations) module provides the
  51. `derivation' primitive, as well as higher-level wrappers such as
  52. `build-expression->derivation'.
  53. Guix does remote procedure calls (RPCs) to the build daemon (the =guix-daemon=
  54. command), which in turn performs builds and accesses to the store on its
  55. behalf. The RPCs are implemented in the (guix store) module.
  56. * Contact
  57. GNU Guix is hosted at https://savannah.gnu.org/projects/guix/.
  58. Please email <help-guix@gnu.org> for questions and <bug-guix@gnu.org> for bug
  59. reports; email <gnu-system-discuss@gnu.org> for general issues regarding the
  60. GNU system.
  61. Join #guix on irc.freenode.net.
  62. * Guix & Nix
  63. GNU Guix is based on [[https://nixos.org/nix/][the Nix package manager]]. It implements the same
  64. package deployment paradigm, and in fact it reuses some of its code.
  65. Yet, different engineering decisions were made for Guix, as described
  66. below.
  67. Nix is really two things: a package build tool, implemented by a library
  68. and daemon, and a special-purpose programming language. GNU Guix relies
  69. on the former, but uses Scheme as a replacement for the latter.
  70. Using Scheme instead of a specific language allows us to get all the
  71. features and tooling that come with Guile (compiler, debugger, REPL,
  72. Unicode, libraries, etc.) And it means that we have a general-purpose
  73. language, on top of which we can have embedded domain-specific languages
  74. (EDSLs), such as the one used to define packages. This broadens what
  75. can be done in package recipes themselves, and what can be done around them.
  76. Technically, Guix makes remote procedure calls to the ‘nix-worker’
  77. daemon to perform operations on the store. At the lowest level, Nix
  78. “derivations” represent promises of a build, stored in ‘.drv’ files in
  79. the store. Guix produces such derivations, which are then interpreted
  80. by the daemon to perform the build. Thus, Guix derivations can use
  81. derivations produced by Nix (and vice versa).
  82. With Nix and the [[https://nixos.org/nixpkgs][Nixpkgs]] distribution, package composition happens at
  83. the Nix language level, but builders are usually written in Bash.
  84. Conversely, Guix encourages the use of Scheme for both package
  85. composition and builders. Likewise, the core functionality of Nix is
  86. written in C++ and Perl; Guix relies on some of the original C++ code,
  87. but exposes all the API as Scheme.
  88. * Related software
  89. - [[https://nixos.org][Nix, Nixpkgs, and NixOS]], functional package manager and associated
  90. software distribution, are the inspiration of Guix
  91. - [[https://www.gnu.org/software/stow/][GNU Stow]] builds around the idea of one directory per prefix, and a
  92. symlink tree to create user environments
  93. - [[https://www.pvv.ntnu.no/~arnej/store/storedoc_6.html][STORE]] shares the same idea
  94. - [[https://live.gnome.org/OSTree/][GNOME's OSTree]] allows bootable system images to be built from a
  95. specified set of packages
  96. - The [[https://www.gnu.org/s/gsrc/][GNU Source Release Collection]] (GSRC) is a user-land software
  97. distribution; unlike Guix, it relies on core tools available on the
  98. host system