diff options
Diffstat (limited to 'emacs/guix-main.scm')
-rw-r--r-- | emacs/guix-main.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 34da6ac6b6..86cedfd459 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -954,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." |