1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- (define-module (guix scripts show)
- #:use-module (guix ui)
- #:use-module (guix scripts package)
- #:use-module ((guix scripts build)
- #:select (%standard-build-options))
- #:use-module (guix scripts)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (srfi srfi-37)
- #:export (guix-show))
- (define (show-help)
- (display (G_ "Usage: guix show [OPTION] PACKAGE...
- Show details about PACKAGE."))
- (display (G_"
- This is an alias for 'guix package --show='.\n"))
- (newline)
- (display (G_ "
- -h, --help display this help and exit"))
- (display (G_ "
- -V, --version display version information and exit"))
- (newline)
- (display (G_ "
- -L, --load-path=DIR prepend DIR to the package module search path"))
- (newline)
- (show-bug-report-information))
- (define %options
-
- (list (option '(#\h "help") #f #f
- (lambda args
- (show-help)
- (exit 0)))
- (option '(#\V "version") #f #f
- (lambda args
- (show-version-and-exit "guix show")))
- (find (lambda (option)
- (member "load-path" (option-names option)))
- %standard-build-options)))
- (define-command (guix-show . args)
- (synopsis "show information about packages")
- (define (handle-argument arg result)
-
- (cons `(query show ,arg)
- result))
- (define opts
- (parse-command-line args %options (list (list))
- #:build-options? #f
- #:argument-handler handle-argument))
- (unless (assoc-ref opts 'query)
- (leave (G_ "missing arguments: no package to show~%")))
- (guix-package* (reverse opts)))
|