~ruther/guix-local

5e6feee61793a6b60aa352dcdbbed0155eb42e7f — Eric Bavier 11 years ago 7eade0e
guix: package: Fix recutils output for non-package inputs.

* guix/ui.scm (package->recutils)[dependencies]: Ignore non-package inputs.
* tests/guix-package.sh: New test.
2 files changed, 5 insertions(+), 2 deletions(-)

M guix/ui.scm
M tests/guix-package.sh
M guix/ui.scm => guix/ui.scm +2 -2
@@ 468,8 468,8 @@ WIDTH columns."
  (format port "version: ~a~%" (package-version p))
  (format port "dependencies: ~a~%"
          (match (package-direct-inputs p)
            (((labels packages . _) ...)
             (dependencies->recutils packages))))
            (((labels inputs . _) ...)
             (dependencies->recutils (filter package? inputs)))))
  (format port "location: ~a~%"
          (or (and=> (package-location p) location->string)
              (_ "unknown")))

M tests/guix-package.sh => tests/guix-package.sh +3 -0
@@ 179,6 179,9 @@ guix package -p "$profile" -A 'gui.*e' | grep guile
# Check whether `--show' returns something sensible.
guix package --show=guile | grep "^name: guile"

# Check show doesn't fail for packages with non-package inputs.
guix package --show=texlive

# There's no generation older than 12 months, so the following command should
# have no effect.
generation="`readlink_base "$profile"`"