diff options
author | Leo Famulari <leo@famulari.name> | 2016-03-21 12:22:31 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2016-03-21 12:22:31 -0400 |
commit | 09ec508a4c14d1bc09622d98f796548d79ab0552 (patch) | |
tree | 86cc5a2a67d35ad796bfa33d67869d670d65822e /emacs | |
parent | 2dbed47f5c09347c9af42c5f5bacfccbc1ab4aff (diff) | |
parent | 71cafa0472a15f2234e24d3c6d8019ebb38685b0 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/guix-base.el | 2 | ||||
-rw-r--r-- | emacs/guix-hydra.el | 4 | ||||
-rw-r--r-- | emacs/guix-main.scm | 16 | ||||
-rw-r--r-- | emacs/guix-ui-package.el | 7 |
4 files changed, 18 insertions, 11 deletions
diff --git a/emacs/guix-base.el b/emacs/guix-base.el index 1248ecbce5..75d19cbfe0 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -44,7 +44,7 @@ (defun guix-package-name-specification (name version &optional output) "Return Guix package specification by its NAME, VERSION and OUTPUT." - (concat name "-" version + (concat name "@" version (when output (concat ":" output)))) diff --git a/emacs/guix-hydra.el b/emacs/guix-hydra.el index 429483946b..9f876e7eea 100644 --- a/emacs/guix-hydra.el +++ b/emacs/guix-hydra.el @@ -36,6 +36,10 @@ (concat ".*\\." (regexp-opt guix-help-system-types) "\\'") "Regexp matching a full name of Hydra job (including system).") +(defun guix-hydra-job-name-specification (name version) + "Return Hydra's job name specification by NAME and VERSION." + (concat name "-" version)) + (defun guix-hydra-message (entries search-type &rest _) "Display a message after showing Hydra ENTRIES." ;; XXX Add more messages maybe. diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 11b9c773b9..86cedfd459 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -86,13 +86,13 @@ (define (full-name->name+version spec) "Given package specification SPEC with or without output, return two values: name and version. For example, for SPEC -\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"." +\"foo@0.9.1b:lib\", return \"foo\" and \"0.9.1b\"." (let-values (((name version output) (package-specification->name+version+output spec))) (values name version))) (define (name+version->full-name name version) - (string-append name "-" version)) + (string-append name "@" version)) (define* (make-package-specification name #:optional version output) (let ((full-name (if version @@ -263,7 +263,8 @@ Example: "Return a list of full names of the packages from package INPUTS." (filter-map (match-lambda ((_ (? package? package)) - (package-full-name package)) + (make-package-specification (package-name package) + (package-version package))) ((_ (? package? package) output) (make-package-specification (package-name package) (package-version package) @@ -953,10 +954,11 @@ GENERATIONS is a list of generation numbers." (define (package-location-string id-or-name) "Return a location string of a package with ID-OR-NAME." - (and-let* ((package (or (package-by-id id-or-name) - (first (packages-by-name id-or-name)))) - (location (package-location package))) - (location->string location))) + (and=> (or (package-by-id id-or-name) + (match (packages-by-name id-or-name) + (() #f) + ((package _ ...) package))) + (compose location->string package-location))) (define (package-source-derivation->store-path derivation) "Return a store path of the package source DERIVATION." diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el index d6d26335fa..9d81c6126e 100644 --- a/emacs/guix-ui-package.el +++ b/emacs/guix-ui-package.el @@ -34,6 +34,7 @@ (require 'guix-guile) (require 'guix-entry) (require 'guix-utils) +(require 'guix-hydra) (require 'guix-hydra-build) (require 'guix-read) (require 'guix-license) @@ -388,7 +389,7 @@ formatted with this string, an action button is inserted.") :system (button-label btn)))) (apply #'guix-hydra-build-get-display 'latest args))) - 'job-name (guix-package-name-specification + 'job-name (guix-hydra-job-name-specification (guix-entry-value entry 'name) (guix-entry-value entry 'version)))) @@ -776,7 +777,7 @@ for all ARGS." (interactive (let ((entry (guix-list-current-entry))) (guix-hydra-build-latest-prompt-args - :job (guix-package-name-specification + :job (guix-hydra-job-name-specification (guix-entry-value entry 'name) (guix-entry-value entry 'version))))) (apply #'guix-hydra-latest-builds number args)) @@ -945,7 +946,7 @@ See `guix-find-location' for the meaning of DIRECTORY." (defun guix-packages-by-name (name &optional profile) "Display Guix packages with NAME. NAME is a string with name specification. It may optionally contain -a version number. Examples: \"guile\", \"guile-2.0.11\". +a version number. Examples: \"guile\", \"guile@2.0.11\". If PROFILE is nil, use `guix-current-profile'. Interactively with prefix, prompt for PROFILE." |