diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2014-07-17 02:36:09 +0200 |
---|---|---|
committer | Cyril Roelandt <tipecaml@gmail.com> | 2014-07-21 22:18:03 +0200 |
commit | 2aa6efb0b9952595853c05294450b4254f64521e (patch) | |
tree | c74d8e0122fd6e4f025595fbec6731ea364dc2c9 /guix | |
parent | 9c0fc27968c2359c49c324c5f89b38436aa2eb49 (diff) | |
download | gnu-guix-2aa6efb0b9952595853c05294450b4254f64521e.tar gnu-guix-2aa6efb0b9952595853c05294450b4254f64521e.tar.gz |
guix package: add a "show" option.
* doc/guix.texi: Update the documentation.
* guix/scripts/package.scm: Add a "show" option.
* tests/guix-package.sh: Add a test for the "show" option.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/package.scm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 1c3209f905..0d17414b4f 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -517,6 +517,8 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (display (_ " -A, --list-available[=REGEXP] list available packages matching REGEXP")) + (display (_ " + --show=PACKAGE show details about PACKAGE")) (newline) (show-build-options-help) (newline) @@ -615,6 +617,11 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (values (cons `(query list-available ,(or arg "")) result) #f))) + (option '("show") #t #t + (lambda (opt name arg result arg-handler) + (values (cons `(query show ,arg) + result) + #f))) %standard-build-options)) @@ -1042,6 +1049,14 @@ more information.~%")) (find-packages-by-description regexp))) #t)) + (('show requested-name) + (let-values (((name version) + (package-name->name+version requested-name))) + (leave-on-EPIPE + (for-each (cute package->recutils <> (current-output-port)) + (find-packages-by-name name version))) + #t)) + (('search-paths) (let* ((manifest (profile-manifest profile)) (entries (manifest-entries manifest)) |