aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2014-07-16 15:38:34 +0200
committerCyril Roelandt <tipecaml@gmail.com>2014-07-21 22:17:59 +0200
commit9c0fc27968c2359c49c324c5f89b38436aa2eb49 (patch)
tree37a181e6f1c32f711af5009b741db9cd29bd88be /guix
parenta4f51df98aaf849daf1a8302b6b7069c76a69ba9 (diff)
downloadgnu-guix-9c0fc27968c2359c49c324c5f89b38436aa2eb49.tar
gnu-guix-9c0fc27968c2359c49c324c5f89b38436aa2eb49.tar.gz
ui: add the "dependencies" field to package->recutils:
* guix/ui.scm (package->recutils): Print the dependencies of the package.
Diffstat (limited to 'guix')
-rw-r--r--guix/ui.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 7338b82401..74ea20e6c8 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -453,9 +453,17 @@ WIDTH columns."
(fill-paragraph str width
(string-length "description: ")))))
+ (define (package<? p1 p2)
+ (string<? (package-full-name p1) (package-full-name p2)))
+
;; Note: Don't i18n field names so that people can post-process it.
(format port "name: ~a~%" (package-name p))
(format port "version: ~a~%" (package-version p))
+ (format port "dependencies: ~a~%"
+ (match (package-direct-inputs p)
+ (((labels packages . _) ...)
+ (string-join (map package-full-name
+ (sort packages package<?)) ", "))))
(format port "location: ~a~%"
(or (and=> (package-location p) location->string)
(_ "unknown")))