ui: add the "dependencies" field to package->recutils:
* guix/ui.scm (package->recutils): Print the dependencies of the package.
This commit is contained in:
parent
a4f51df98a
commit
9c0fc27968
|
@ -453,9 +453,17 @@ WIDTH columns."
|
||||||
(fill-paragraph str width
|
(fill-paragraph str width
|
||||||
(string-length "description: ")))))
|
(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.
|
;; Note: Don't i18n field names so that people can post-process it.
|
||||||
(format port "name: ~a~%" (package-name p))
|
(format port "name: ~a~%" (package-name p))
|
||||||
(format port "version: ~a~%" (package-version 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~%"
|
(format port "location: ~a~%"
|
||||||
(or (and=> (package-location p) location->string)
|
(or (and=> (package-location p) location->string)
|
||||||
(_ "unknown")))
|
(_ "unknown")))
|
||||||
|
|
Loading…
Reference in New Issue