mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
pack: Add ‘--file=FILE’ with the same meaning as for ‘guix build’.
* guix/scripts/pack.scm (%options): add --file=FILE, but no shorthand (that’s already taken for format). * doc/guix.texi (Invoking guix pack): Document it. Change-Id: I87797fccdf218ead3b7f471a84034e8a8d566245 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
fb41002935
commit
62f8399e6a
2 changed files with 19 additions and 0 deletions
|
@ -7276,6 +7276,14 @@ This has the same purpose as the same-named option in @command{guix
|
||||||
build} (@pxref{Additional Build Options, @option{--expression} in
|
build} (@pxref{Additional Build Options, @option{--expression} in
|
||||||
@command{guix build}}).
|
@command{guix build}}).
|
||||||
|
|
||||||
|
@item --file=@var{file}
|
||||||
|
build a pack the code within @var{file} evaluates to.
|
||||||
|
|
||||||
|
This has the same purpose as the same-named option in @command{guix
|
||||||
|
build} (@pxref{Additional Build Options, @option{--file} in
|
||||||
|
@command{guix build}}), but it has no shorthand, because @option{-f}
|
||||||
|
already means @option{--format}.
|
||||||
|
|
||||||
@anchor{pack-manifest}
|
@anchor{pack-manifest}
|
||||||
@item --manifest=@var{file}
|
@item --manifest=@var{file}
|
||||||
@itemx -m @var{file}
|
@itemx -m @var{file}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
(define-module (guix scripts pack)
|
(define-module (guix scripts pack)
|
||||||
#:use-module (guix scripts)
|
#:use-module (guix scripts)
|
||||||
|
#:autoload (guix import json) (json->scheme-file)
|
||||||
#:use-module (guix ui)
|
#:use-module (guix ui)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
@ -1530,6 +1531,9 @@ libfakechroot.so and related ld.so machinery as a fallback."
|
||||||
(lambda (opt name arg result)
|
(lambda (opt name arg result)
|
||||||
(alist-cons 'derivation-only? #t result)))
|
(alist-cons 'derivation-only? #t result)))
|
||||||
|
|
||||||
|
(option '("file") #t #f
|
||||||
|
(lambda (opt name arg result)
|
||||||
|
(alist-cons 'file arg result)))
|
||||||
(option '(#\f "format") #t #f
|
(option '(#\f "format") #t #f
|
||||||
(lambda (opt name arg result)
|
(lambda (opt name arg result)
|
||||||
(alist-cons 'format (string->symbol arg) result)))
|
(alist-cons 'format (string->symbol arg) result)))
|
||||||
|
@ -1620,6 +1624,8 @@ Create a bundle of PACKAGE.\n"))
|
||||||
(show-deb-format-options)
|
(show-deb-format-options)
|
||||||
(show-rpm-format-options)
|
(show-rpm-format-options)
|
||||||
(newline)
|
(newline)
|
||||||
|
(display (G_ "
|
||||||
|
--file=FORMAT build a pack the code within FILE evaluates to"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-f, --format=FORMAT build a pack in the given FORMAT"))
|
-f, --format=FORMAT build a pack in the given FORMAT"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
@ -1684,6 +1690,11 @@ Create a bundle of PACKAGE.\n"))
|
||||||
list))
|
list))
|
||||||
(('expression . exp)
|
(('expression . exp)
|
||||||
(read/eval-package-expression exp))
|
(read/eval-package-expression exp))
|
||||||
|
(('file . file)
|
||||||
|
(let ((file (or (and (string-suffix? ".json" file)
|
||||||
|
(json->scheme-file file))
|
||||||
|
file)))
|
||||||
|
(load* file (make-user-module '()))))
|
||||||
(x #f)))
|
(x #f)))
|
||||||
|
|
||||||
(define (manifest-from-args store opts)
|
(define (manifest-from-args store opts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue