summaryrefslogtreecommitdiff
path: root/emacs/guix-ui-package.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-01-20 18:53:19 +0300
committerAlex Kost <alezost@gmail.com>2016-01-25 22:11:47 +0300
commit83aab70b2d4d11fa345c1fbf2ccdbec8b7ad6662 (patch)
tree649f2a0d01b6b6506284b3af672e4cc7f850a13b /emacs/guix-ui-package.el
parentcefb7aea9d068a03c79bb6f26ea87082ea214f10 (diff)
downloadpatches-83aab70b2d4d11fa345c1fbf2ccdbec8b7ad6662.tar
patches-83aab70b2d4d11fa345c1fbf2ccdbec8b7ad6662.tar.gz
emacs: Add 'guix-packages-by-license' command.
* emacs/guix-main.scm (packages-by-license): New procedure. (%patterns-makers): Add 'license' search type. * emacs/guix-messages.el (guix-message-packages-by-license): New procedure. (guix-messages): Use it. * emacs/guix-ui-package.el (guix-packages-by-license): New command. * doc/emacs.texi (Emacs Commands): Document it.
Diffstat (limited to 'emacs/guix-ui-package.el')
-rw-r--r--emacs/guix-ui-package.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 655ed74472..414bc9b9d2 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -35,6 +35,7 @@
(require 'guix-entry)
(require 'guix-utils)
(require 'guix-hydra-build)
+(require 'guix-read)
(require 'guix-license)
(guix-ui-define-entry-type package)
@@ -933,6 +934,17 @@ Interactively with prefix, prompt for PROFILE."
(guix-package-get-display profile 'name name))
;;;###autoload
+(defun guix-packages-by-license (license &optional profile)
+ "Display Guix packages with LICENSE.
+LICENSE is a license name string.
+If PROFILE is nil, use `guix-current-profile'.
+Interactively with prefix, prompt for PROFILE."
+ (interactive
+ (list (guix-read-license-name)
+ (guix-ui-read-profile)))
+ (guix-package-get-display profile 'license license))
+
+;;;###autoload
(defun guix-search-by-regexp (regexp &optional params profile)
"Search for Guix packages by REGEXP.
PARAMS are package parameters that should be searched.