guix package: -A and -s take supported systems into account.

* guix/scripts/package.scm (guix-package)[process-query]
  <list-available>: Restrict results to packages matching
  'supported-package?".
* guix/ui.scm (package->recutils): Print "systems:".
* tests/guix-package.sh: Add tests.
* doc/guix.texi (Invoking guix package): Adjust description of
  '--list-available' accordingly.
This commit is contained in:
Ludovic Courtès 2015-04-19 19:12:22 +02:00
parent bbceb0ef8a
commit 5763ad9266
4 changed files with 21 additions and 7 deletions

View file

@ -212,9 +212,19 @@ cat > "$module_dir/foo.scm"<<EOF
(patches (list (search-patch "emacs.patch")))))
(name "emacs-foo-bar-patched")
(version "42")))
(define-public y
(package (inherit emacs)
(name "super-non-portable-emacs")
(supported-systems '("foobar64-hurd"))))
EOF
guix package -i emacs-foo-bar-patched -n
# This one should not show up in searches since it's no supported on the
# current system.
test "`guix package -A super-non-portable-emacs`" = ""
test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: "
unset GUIX_PACKAGE_PATH
# Using 'GUIX_BUILD_OPTIONS'.