diff options
author | Alex Kost <alezost@gmail.com> | 2015-12-28 21:40:06 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2016-01-07 22:30:18 +0300 |
commit | 0a5ec7092d4398cbbab16ba523997233aae8ddc6 (patch) | |
tree | 66d35405a539763986506f6ddc2194caffafa295 /emacs | |
parent | cb933df6daa08c0fbb0604f32badc7b97281d5e5 (diff) | |
download | gnu-guix-0a5ec7092d4398cbbab16ba523997233aae8ddc6.tar gnu-guix-0a5ec7092d4398cbbab16ba523997233aae8ddc6.tar.gz |
emacs: Display supported systems in "Package Info".
* emacs/guix-main.scm (%package-param-alist): Add 'systems'.
* emacs/guix-ui-package.el (guix-package-info-insert-systems): New
procedure.
(guix-package-info-format): Add it.
(guix-output-info-format): Likewise.
(guix-package-info-titles): Add "Supported systems" title.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/guix-main.scm | 1 | ||||
-rw-r--r-- | emacs/guix-ui-package.el | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 6f9eb422e0..8c38e7cae3 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -307,6 +307,7 @@ Example: (description . ,package-description-string) (home-url . ,package-home-page) (outputs . ,package-outputs) + (systems . ,package-supported-systems) (non-unique . ,(negate package-unique?)) (inputs . ,(lambda (pkg) (package-inputs-names diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el index e0c98eaed6..12bfaeef68 100644 --- a/emacs/guix-ui-package.el +++ b/emacs/guix-ui-package.el @@ -221,11 +221,13 @@ ENTRIES is a list of package entries to get info about packages." (location format (format guix-package-location)) (home-url format (format guix-url)) (license format (format guix-package-info-license)) + (systems format guix-package-info-insert-systems) (inputs format (format guix-package-input)) (native-inputs format (format guix-package-native-input)) (propagated-inputs format (format guix-package-propagated-input))) - :titles '((home-url . "Home page")) + :titles '((home-url . "Home page") + (systems . "Supported systems")) :required '(id name version installed non-unique)) (guix-info-define-interface installed-output @@ -363,6 +365,20 @@ formatted with this string, an action button is inserted.") 'guix-package-name 'face 'guix-package-info-heading)) +(defun guix-package-info-insert-systems (systems entry) + "Insert supported package SYSTEMS at point." + (guix-info-insert-value-format + systems 'guix-hydra-build-system + 'action (lambda (btn) + (let ((args (guix-hydra-build-latest-prompt-args + :job (button-get btn 'job-name) + :system (button-label btn)))) + (apply #'guix-hydra-build-get-display + 'latest args))) + 'job-name (guix-package-name-specification + (guix-entry-value entry 'name) + (guix-entry-value entry 'version)))) + (defmacro guix-package-info-define-insert-inputs (&optional type) "Define a face and a function for inserting package inputs. TYPE is a type of inputs. @@ -749,6 +765,7 @@ for all ARGS." (location format (format guix-package-location)) (home-url format (format guix-url)) (license format (format guix-package-info-license)) + (systems format guix-package-info-insert-systems) (inputs format (format guix-package-input)) (native-inputs format (format guix-package-native-input)) (propagated-inputs format |