~ruther/guix-local

9c0fc27968c2359c49c324c5f89b38436aa2eb49 — Cyril Roelandt 11 years ago a4f51df
ui: add the "dependencies" field to package->recutils:

* guix/ui.scm (package->recutils): Print the dependencies of the package.
1 files changed, 8 insertions(+), 0 deletions(-)

M guix/ui.scm
M guix/ui.scm => guix/ui.scm +8 -0
@@ 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")))