GNU bug report logs -
#74500
pack: add ‘--file=FILE’ with the same meaning as for guix build
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74500 in the body.
You can then email your comments to 74500 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#74500
; Package
guix-patches
.
(Sat, 23 Nov 2024 23:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 23 Nov 2024 23:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
the attached patch adds the option to use `guix pack --file=guix.scm` just
like you’d use `guix build --file=guix.scm` or `guix shell
--file=guix.scm`.
guix pack -f ... still means --format to preserve backwards
compatibility. Only the long option --file is added.
[0001-pack-add-file-FILE-with-the-same-meaning-as-for-guix.patch (text/x-patch, inline)]
From a1956bea3a33fed9a01246c9e5e394a7dd9daf6c Mon Sep 17 00:00:00 2001
Message-ID: <a1956bea3a33fed9a01246c9e5e394a7dd9daf6c.1732404894.git.arne_bab <at> web.de>
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Sun, 24 Nov 2024 00:32:36 +0100
Subject: [PATCH] =?UTF-8?q?pack:=20add=20=E2=80=98--file=3DFILE=E2=80=99?=
=?UTF-8?q?=20with=20the=20same=20meaning=20as=20for=20guix=20build?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* guix/scripts/pack.scm (%options): add --file=FILE, but no
shorthand (that’s already taken for format).
* doc/guix.texi (Invoking guix pack): document --file
Change-Id: I87797fccdf218ead3b7f471a84034e8a8d566245
---
doc/guix.texi | 8 ++++++++
guix/scripts/pack.scm | 11 +++++++++++
2 files changed, 19 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 29bce718d4..aea8bf6063 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7217,6 +7217,14 @@ Invoking guix pack
build} (@pxref{Additional Build Options, @option{--expression} in
@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}
@item --manifest=@var{file}
@itemx -m @var{file}
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 7c5fe76fe0..d588f40257 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -28,6 +28,7 @@
(define-module (guix scripts pack)
#:use-module (guix scripts)
+ #:autoload (guix import json) (json->scheme-file)
#:use-module (guix ui)
#:use-module (guix gexp)
#:use-module (guix utils)
@@ -1430,6 +1431,9 @@ (define %options
(lambda (opt name arg 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
(lambda (opt name arg result)
(alist-cons 'format (string->symbol arg) result)))
@@ -1520,6 +1524,8 @@ (define (show-help)
(show-deb-format-options)
(show-rpm-format-options)
(newline)
+ (display (G_ "
+ --file=FORMAT build a pack the code within FILE evaluates to"))
(display (G_ "
-f, --format=FORMAT build a pack in the given FORMAT"))
(display (G_ "
@@ -1584,6 +1590,11 @@ (define-command (guix-pack . args)
list))
(('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)))
(define (manifest-from-args store opts)
base-commit: 7c93145d9e027cb571bf7634192dfae5468ecde2
prerequisite-patch-id: 088a72da8c11e5d1c7087b4a5e8bb9c4a3b9b2af
prerequisite-patch-id: a092dba2c994aba4c74f1484621cebe53f548492
prerequisite-patch-id: 09ee3fdfcc708aeec9e6a7a54e2993e857e19aca
prerequisite-patch-id: 7957383d6685c848a7cbfa78e930adeaf528a2e1
prerequisite-patch-id: aa5d5050c29bbacf33790ca89f8c2690337f3ac7
prerequisite-patch-id: 2883dba4155a5a883cf03d43a130cb5f31de189c
prerequisite-patch-id: d14add7cc2f54106903ee5427a510b4204fb636f
prerequisite-patch-id: 2beca5d9522ccdc5c6751681bbf00d5107380fd8
--
2.46.0
[Message part 3 (text/plain, inline)]
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 02 Dec 2024 11:03:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
:
bug acknowledged by developer.
(Mon, 02 Dec 2024 11:03:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 74500-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de> skribis:
> From a1956bea3a33fed9a01246c9e5e394a7dd9daf6c Mon Sep 17 00:00:00 2001
> Message-ID: <a1956bea3a33fed9a01246c9e5e394a7dd9daf6c.1732404894.git.arne_bab <at> web.de>
> From: Arne Babenhauserheide <arne_bab <at> web.de>
> Date: Sun, 24 Nov 2024 00:32:36 +0100
> Subject: [PATCH] =?UTF-8?q?pack:=20add=20=E2=80=98--file=3DFILE=E2=80=99?=
> =?UTF-8?q?=20with=20the=20same=20meaning=20as=20for=20guix=20build?=
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> * guix/scripts/pack.scm (%options): add --file=FILE, but no
> shorthand (that’s already taken for format).
> * doc/guix.texi (Invoking guix pack): document --file
>
> Change-Id: I87797fccdf218ead3b7f471a84034e8a8d566245
Applied with this minor change:
[Message part 2 (text/x-patch, inline)]
diff --git a/doc/guix.texi b/doc/guix.texi
index 0d461fb96a..594d152de6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7277,7 +7277,8 @@ Invoking guix pack
@command{guix build}}).
@item --file=@var{file}
-build a pack the code within @var{file} evaluates to.
+Build a pack containing the package or other object 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
[Message part 3 (text/plain, inline)]
Thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 30 Dec 2024 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.