refresh: Add '--load-path' option.
* guix/scripts/refresh.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it.
This commit is contained in:
parent
2d4688c1ea
commit
21f4fbdd84
2 changed files with 31 additions and 6 deletions
|
@ -70,7 +70,7 @@ Copyright @copyright{} 2019 Kyle Andrews@*
|
||||||
Copyright @copyright{} 2019 Alex Griffin@*
|
Copyright @copyright{} 2019 Alex Griffin@*
|
||||||
Copyright @copyright{} 2019 Guillaume Le Vaillant@*
|
Copyright @copyright{} 2019 Guillaume Le Vaillant@*
|
||||||
Copyright @copyright{} 2020 Leo Prikler@*
|
Copyright @copyright{} 2020 Leo Prikler@*
|
||||||
Copyright @copyright{} 2019 Simon Tournier@*
|
Copyright @copyright{} 2019, 2020 Simon Tournier@*
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||||
|
@ -9553,6 +9553,13 @@ the user whether to download it or not. This is the default behavior.
|
||||||
@item --key-server=@var{host}
|
@item --key-server=@var{host}
|
||||||
Use @var{host} as the OpenPGP key server when importing a public key.
|
Use @var{host} as the OpenPGP key server when importing a public key.
|
||||||
|
|
||||||
|
@item --load-path=@var{directory}
|
||||||
|
Add @var{directory} to the front of the package module search path
|
||||||
|
(@pxref{Package Modules}).
|
||||||
|
|
||||||
|
This allows users to define their own packages and make them visible to
|
||||||
|
the command-line tools.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
The @code{github} updater uses the
|
The @code{github} updater uses the
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
|
||||||
|
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
#:use-module (guix ui)
|
#:use-module (guix ui)
|
||||||
#:use-module (gcrypt hash)
|
#:use-module (gcrypt hash)
|
||||||
#:use-module (guix scripts)
|
#:use-module (guix scripts)
|
||||||
|
#:use-module ((guix scripts build) #:select (%standard-build-options))
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
@ -116,6 +118,19 @@
|
||||||
(leave (G_ "unsupported policy: ~a~%")
|
(leave (G_ "unsupported policy: ~a~%")
|
||||||
arg)))))
|
arg)))))
|
||||||
|
|
||||||
|
;; The short option -L is already used by --list-updaters, therefore
|
||||||
|
;; it needs to be removed from %standard-build-options.
|
||||||
|
(let ((%load-path-option (find (lambda (option)
|
||||||
|
(member "load-path"
|
||||||
|
(option-names option)))
|
||||||
|
%standard-build-options)))
|
||||||
|
(option
|
||||||
|
(filter (lambda (name) (not (equal? #\L name)))
|
||||||
|
(option-names %load-path-option))
|
||||||
|
(option-required-arg? %load-path-option)
|
||||||
|
(option-optional-arg? %load-path-option)
|
||||||
|
(option-processor %load-path-option)))
|
||||||
|
|
||||||
(option '(#\h "help") #f #f
|
(option '(#\h "help") #f #f
|
||||||
(lambda args
|
(lambda args
|
||||||
(show-help)
|
(show-help)
|
||||||
|
@ -165,6 +180,9 @@ specified with `--select'.\n"))
|
||||||
'always', 'never', and 'interactive', which is also
|
'always', 'never', and 'interactive', which is also
|
||||||
used when 'key-download' is not specified"))
|
used when 'key-download' is not specified"))
|
||||||
(newline)
|
(newline)
|
||||||
|
(display (G_ "
|
||||||
|
--load-path=DIR prepend DIR to the package module search path"))
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
Reference in a new issue