1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- (define-module (guix scripts install)
- #:use-module (guix ui)
- #:use-module (guix scripts package)
- #:use-module (guix scripts build)
- #:use-module (guix scripts)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (srfi srfi-37)
- #:export (guix-install))
- (define (show-help)
- (display (G_ "Usage: guix install [OPTION] PACKAGES...
- Install the given PACKAGES.
- This is an alias for 'guix package -i'.\n"))
- (display (G_ "
- -p, --profile=PROFILE use PROFILE instead of the user's default profile"))
-
- (display (G_ "
- -v, --verbosity=LEVEL use the given verbosity LEVEL"))
- (newline)
- (show-build-options-help)
- (newline)
- (show-transformation-options-help)
- (newline)
- (display (G_ "
- -h, --help display this help and exit"))
- (display (G_ "
- -V, --version display version information and exit"))
- (newline)
- (show-bug-report-information))
- (define %options
-
- (cons* (option '(#\h "help") #f #f
- (lambda args
- (show-help)
- (exit 0)))
- (option '(#\V "version") #f #f
- (lambda args
- (show-version-and-exit "guix install")))
-
- (append (filter (lambda (option)
- (any (cut member <> (option-names option))
- '("profile" "dry-run" "verbosity" "bootstrap")))
- %package-options)
- %transformation-options
- %standard-build-options)))
- (define-command (guix-install . args)
- (synopsis "install packages")
- (define (handle-argument arg result arg-handler)
-
- (values (alist-cons 'install arg result)
- arg-handler))
- (define opts
- (parse-command-line args %options
- (list %package-default-options #f)
- #:argument-handler handle-argument))
- (guix-package* opts))
|