summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm37
1 files changed, 22 insertions, 15 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 2eb18919cc..a69efa365e 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,8 +56,6 @@
#:use-module (srfi srfi-35)
#:use-module (srfi srfi-37)
#:use-module (gnu packages)
- #:autoload (gnu packages base) (canonical-package)
- #:autoload (gnu packages guile) (guile-2.2)
#:autoload (gnu packages bootstrap) (%bootstrap-guile)
#:export (build-and-use-profile
delete-generations
@@ -789,18 +788,26 @@ processed, #f otherwise."
(display-search-results matches (current-output-port)))
#t))
- (('show requested-name)
- (let-values (((name version)
- (package-name->name+version requested-name)))
- (match (remove package-superseded
- (find-packages-by-name name version))
- (()
- (leave (G_ "~a~@[@~a~]: package not found~%") name version))
- (packages
- (leave-on-EPIPE
- (for-each (cute package->recutils <> (current-output-port))
- packages))))
- #t))
+ (('show _)
+ (let ((requested-names
+ (filter-map (match-lambda
+ (('query 'show requested-name) requested-name)
+ (_ #f))
+ opts)))
+ (for-each
+ (lambda (requested-name)
+ (let-values (((name version)
+ (package-name->name+version requested-name)))
+ (match (remove package-superseded
+ (find-packages-by-name name version))
+ (()
+ (leave (G_ "~a~@[@~a~]: package not found~%") name version))
+ (packages
+ (leave-on-EPIPE
+ (for-each (cute package->recutils <> (current-output-port))
+ packages))))))
+ requested-names))
+ #t)
(('search-paths kind)
(let* ((manifests (map profile-manifest profiles))
@@ -963,5 +970,5 @@ option processing with 'parse-command-line'."
(%store)
(if (assoc-ref opts 'bootstrap?)
%bootstrap-guile
- (canonical-package guile-2.2)))))
+ (default-guile)))))
(process-actions (%store) opts))))))))