README 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. -*- mode: org -*-
  2. * About
  3. =Emacs-Guix= (aka =guix.el=) provides various features and tools
  4. for [[http://www.gnu.org/software/guix/][GNU Guix]] package manager.
  5. It allows you to manage your Guix profile(s) from Emacs: to install,
  6. upgrade and remove packages, to switch and remove profile generations,
  7. to display all available info about packages and to do many other
  8. things.
  9. If you are [[https://github.com/emacs-evil/evil][Evil]] user, note that [[https://github.com/emacs-evil/evil-collection][Evil Collection]] provide key bindings for
  10. Emacs-Guix.
  11. This README provides only a basic overview on Emacs-Guix, for a full and
  12. detailed description, see the [[https://emacs-guix.gitlab.io/website/manual/latest/html_node/index.html][info manual]] that comes with it.
  13. In short, Emacs-Guix provides the following features:
  14. - Interface for:
  15. + profiles
  16. + profile generations (including system generations for Guix System)
  17. + packages
  18. + services
  19. + package licenses
  20. + package and service locations
  21. + [[/gnu/store]] items
  22. - Magit-like popup interface for all Emacs-Guix and Guix shell commands
  23. (=M-x guix=).
  24. - Modes to view logs of package builds (=guix-build-log-mode= and
  25. =guix-build-log-minor-mode=).
  26. - Minor mode to "prettify" store file names (to replace hash parts with
  27. "…").
  28. - Shell completions for all guix commands and options (for =M-x shell=
  29. and =M-x eshell=).
  30. - Minor mode with additional functionality for =scheme-mode= to work
  31. with Guix .scm files, particularly with package modules
  32. (=guix-devel-mode=).
  33. On the following screenshot you can see one of the mentioned features,
  34. namely: "list" and "info" interface for Guix packages (this screenshot
  35. was made for an early version of Emacs-Guix, the interface has slightly
  36. changed since then).
  37. [[http://i.imgur.com/gRcu14n.png]]
  38. ([[https://gitlab.com/alezost-emacs/alect-themes][alect-light]] theme is used there).
  39. * Installation
  40. Emacs-Guix can be installed using Guix, from [[http://melpa.org/][MELPA]], or it can be used
  41. from a git checkout. *Note* that it is not recommended to mix several
  42. installations (in particular, Guix and MELPA), as it may lead to
  43. incompatibilities in the source (=.scm=) and compiled (=.go=) Guile
  44. files (see [[https://github.com/alezost/guix.el/issues/21][issue 21]]).
  45. ** Guix
  46. Just use:
  47. #+BEGIN_SRC sh
  48. guix package -i emacs-guix
  49. #+END_SRC
  50. ** MELPA
  51. If you added "melpa" or "melpa-stable" archives to =package-archives= as
  52. it is described on the [[http://melpa.org/#/getting-started][MELPA Getting Started]] page, you can install
  53. "emacs-guix" using =M-x package-install= or =M-x list-packages=
  54. commands.
  55. ** Git checkout
  56. Also you can clone this git repository and use Emacs-Guix from this git
  57. checkout (see the info manual for details).
  58. Finally, if you have the git checkout, you can install Guix package for
  59. the current commit of Emacs-Guix using [[file:guix.scm]] file:
  60. #+BEGIN_SRC sh
  61. guix package --install-from-file=guix.scm
  62. #+END_SRC
  63. * IMPORTANT NOTE for non-Guix-System users
  64. If you installed Guix using [[https://www.gnu.org/software/guix/manual/en/html_node/Binary-Installation.html][Binary Installation]] method, most likely your
  65. environment (in particular, =GUILE_LOAD_PATH=) does not know where Guile
  66. modules of Guix and its dependencies are placed (they are somewhere in
  67. the store). But these Guile modules are needed for Emacs-Guix, so…
  68. … if (during using Emacs-Guix) you encounter errors about missing
  69. modules, undefined variables, other strange errors from Guile REPL, or
  70. if you see unexpectedly small amount of Guix packages, you may try the
  71. following workaround for this problem:
  72. - Install =guix= and =guile= into your user profile:
  73. #+BEGIN_SRC sh
  74. guix package -i guile guix
  75. #+END_SRC
  76. This guarantees that all Guile modules required by Guix will be
  77. available for external programs (in particular, for Guile and
  78. Emacs-Guix).
  79. - Make sure your system uses Guix environment, i.e., check that your
  80. =~/.bash_profile= contains lines like these:
  81. #+BEGIN_SRC sh
  82. source "$HOME/.guix-profile/etc/profile"
  83. source "$HOME/.config/guix/current/etc/profile"
  84. #+END_SRC
  85. Note, that the "current" profile should be sourced the last. Thus the
  86. latest guix (fetched by =guix pull=) will have a priority.
  87. If you still have a problem after the above steps, feel free to open an
  88. issue about it.
  89. * Usage
  90. =M-x guix= is the entry point for the available features.
  91. You can also call =M-x guix-help= to get a summary of all available
  92. commands. Here is an *incomplete* list of them:
  93. - Show packages and their definitions:
  94. : M-x guix-all-packages
  95. : M-x guix-installed-user-packages
  96. : M-x guix-installed-system-packages
  97. : M-x guix-packages-by-name
  98. : M-x guix-packages-by-license
  99. : M-x guix-packages-by-location
  100. : M-x guix-package-from-file
  101. : M-x guix-search-by-name
  102. : M-x guix-search-by-regexp
  103. : M-x guix-package-locations
  104. : M-x guix-find-package-definition
  105. - Show profiles and profile generations:
  106. : M-x guix-profiles
  107. : M-x guix-generations
  108. : M-x guix-system-generations
  109. - Show services and their definitions:
  110. : M-x guix-all-services
  111. : M-x guix-services-by-name
  112. : M-x guix-services-by-regexp
  113. : M-x guix-services-by-location
  114. : M-x guix-service-locations
  115. : M-x guix-find-service-definition
  116. - Show store items:
  117. : M-x guix-store-live-items
  118. : M-x guix-store-dead-items
  119. : M-x guix-store-failures
  120. : M-x guix-store-item-referrers
  121. : M-x guix-store-item-references
  122. : M-x guix-store-item-requisites
  123. : M-x guix-store-item-derivers
  124. - Show/browse package licenses:
  125. : M-x guix-licenses
  126. : M-x guix-browse-license-url
  127. : M-x guix-find-license-definition
  128. - Magit-like interface:
  129. : M-x guix
  130. - Miscellaneous commands:
  131. : M-x guix-help
  132. : M-x guix-about
  133. : M-x guix-pull
  134. : M-x guix-prettify-mode
  135. : M-x guix-build-log-mode
  136. : M-x guix-devel-mode