From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MJLBIYJnQmfqoQAAe85BDQ:P1 (envelope-from ) for ; Sat, 23 Nov 2024 23:38:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id MJLBIYJnQmfqoQAAe85BDQ (envelope-from ) for ; Sun, 24 Nov 2024 00:38:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=b+zfM1mU; dkim=fail ("headers rsa verify failed") header.d=web.de header.s=s29768273 header.b=SVSIo0rd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732405122; a=rsa-sha256; cv=none; b=ufx/Q8fA0QPuoTeHJ9D8Kgvz/MVB+l96ize+PpTIFJLQk2/u2SV/aP89PODs4XnAIEmQPj scl4g4z9UQwj/rW77UuKiV7Exnh/cordKNDm8Wpyj9eCvax465RtSqdElgAsy8ng9dv1pN yOVIJ8Q2c8XT294pSxCQ+2z8aQ5SrJge+fK+zX820sNNWpvrKIap0mtRlmARSfuBdW+6Zb D0+RCKQo1gN7A8ffzi+DM073YvtmUkQswrcVBASFwP1A7UDrPYp8GTE3jZFUP9HL9sT296 MglRALmfmVL0sN86LiAcVndDvqwefRJytYjVeMNFyySnegxVB4DwUWNy8GbzHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=b+zfM1mU; dkim=fail ("headers rsa verify failed") header.d=web.de header.s=s29768273 header.b=SVSIo0rd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732405122; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=QB8w61gT9zu2w3qs0JcfhO6e7wsBxWjcm8bY2RccvPA=; b=CTnKNZd2M5MLFjMHDQIIUgHjHpQk86ViXyq96IPHtQS7PAgAsGKEpbwhx/L5sdHKwarHpy +P0JvcFJLppM231BW5XpCUFxrWvgATl36n6JfDOUQTZqLcPx9mPGCqK9MG0hMUjJs59J7D ucVXnU+ikYBch/xaSgdzBQJ8KDLI25hC/sNinVaT9JXK5WSLNWs7/NEn/3yfNzt37hy5mL UUy3122XGy+xev1GnBvGsxWgMWCsc+cEXzv9r5RImGpYkyVjfk9IWjPegIzI95wv+biNyz s1OyX/m+GNPjli+hqBUHqiEJJmZujEbmGqD8T7d96osiYCFt/mKDloF6JSyzYQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7E17F53994 for ; Sun, 24 Nov 2024 00:38:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEzhW-0005fe-Hg; Sat, 23 Nov 2024 18:38:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEzhU-0005fT-H5 for guix-patches@gnu.org; Sat, 23 Nov 2024 18:38:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEzhU-00010x-8x for guix-patches@gnu.org; Sat, 23 Nov 2024 18:38:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=QB8w61gT9zu2w3qs0JcfhO6e7wsBxWjcm8bY2RccvPA=; b=b+zfM1mUCLae/r3HeUHAm8uxWmttXGAgNMJCXuVEBxSrDK6leEcsX5kWDtkQ5iGP+M7JkTum5eFLQrY5+Bwbxiqzkm6//3Eu+1TR4HuFlFE47MpnxQeBpu/aI4pTpXHfHDVDcJm6xu+uz08ZE+4l00iTyJBJ4maHRCXbMMR8kqK6JUgrTpEHZp356al6elD8YRhyQsymhyHWkaRgMLNCe/udDD6X3LPOBSVH48iAX+ht7lYzXXxtEaadRcp63DwVq1dVRMXCJ9CgjkaHOviSXIWwEoH7wRkd+OvCfI6eknCiR8oIZ0AW4EOKL/S2l1Mpomqw1ol2T5wldaWitHTKZQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEzhS-0005R2-3K for guix-patches@gnu.org; Sat, 23 Nov 2024 18:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74500] pack: add =?UTF-8?Q?=E2=80=98--file=3DFILE=E2=80=99?= with the same meaning as for guix build Resent-From: "Dr. Arne Babenhauserheide" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Nov 2024 23:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74500 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 74500@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173240507520862 (code B ref -1); Sat, 23 Nov 2024 23:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Nov 2024 23:37:55 +0000 Received: from localhost ([127.0.0.1]:59891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEzhL-0005QQ-5L for submit@debbugs.gnu.org; Sat, 23 Nov 2024 18:37:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:44264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEzhI-0005QH-Nw for submit@debbugs.gnu.org; Sat, 23 Nov 2024 18:37:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEzhI-0005ew-HS for guix-patches@gnu.org; Sat, 23 Nov 2024 18:37:52 -0500 Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEzhG-00010g-Id for guix-patches@gnu.org; Sat, 23 Nov 2024 18:37:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1732405067; x=1733009867; i=arne_bab@web.de; bh=QB8w61gT9zu2w3qs0JcfhO6e7wsBxWjcm8bY2RccvPA=; h=X-UI-Sender-Class:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type:cc:content-transfer-encoding:content-type:date:from: message-id:mime-version:reply-to:subject:to; b=SVSIo0rd77xXu9qbVQGJG7AZ7jX9RKccF6GmI8uG2IJ6lAbw/lF2hQ0eVx9zLjM9 PKnKf4GlvpK6Lw9Yilkn56eKFtysXHQvJyEnYhEOZovnirqoy/GQbcBYQPYn8UPtW 9AYTOQUmjGES4rbgO6YfcQ9EGuyqXGvzMuSNSBksw4eSkFdLvHJw7B/NTOPZFe/cR BSn8PxMZ8vcacXtcmjyXh1oTwLzKhXsHBaSGmp4CPn+OIM/RcjSHhT4UXzNdMJ8mu wnbsZHqFGOXdAeoJ1A+7hCeE1YwsiQOkdPYhCiupSpRtvnNEXHCozkX7kohSJSFQH dYWs/+wvZvrHya8C3A== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from fluss ([84.165.21.171]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MQ8Wa-1t1k8h34Do-00OtKQ; Sun, 24 Nov 2024 00:37:47 +0100 Date: Sun, 24 Nov 2024 00:37:46 +0100 Message-ID: <87y119bjxx.fsf@web.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Provags-ID: V03:K1:BCdmN5ntFCN3LJvzAZSM04BPKeA7DXkngc2snAEn24bXIq/Jfe2 vbncPOP1uzwaZRTbCrd/6u07y/E6VvnoKKpuKF4XauVgSqsDTld9/xRrs8vcIzWcGI3f5p1 IxSoN9mNjg3kC2TpDDBPopeYs0QajCtNQOJMfz7WPkTZ3FnKCAXRfR/H8o7hFhjIlYwVk/r /3OheCO1D51VWkA86ei3Q== UI-OutboundReport: notjunk:1;M01:P0:VKnt9B/hppk=;TPFF32zCdhaLM6PE5js6rwFbzR7 AAZF3b4vJmCt43yszOT2jst1zm6BhXYvp92QiBtUYgfztmwcIT0QnSiu+oB7SghEfofQIYBzM mkum916Egj1FevRIbZN6wy4VR5iHF171rEipjK/gfUwj71L10Jzx17H/g9HfqQQyAbAkr5WwI Xmbxl4xma9Lbv3VJYKJAAy8rj2RnqWakmmbZ9hrfuQImnayhI6GsufrfSikKoVvHi/GLovS6e M6oEQ8rQLF7EtUX62R+Wh4vr93aX08YnGpdGrZu1oP0QV4MacHgophxMgdzfl/Hh9K93ItJre 0ZkyaFcFVq5wuofLgA0jqe+E1+VVMRhZ/rwQVxYBOxg/MY9PhozIw4cgsR86n6B44ghWMleBK aY3E3WGxqE7cV0f4Ik2lNoC9IsaQT051jkoanJPSqQ3nfoApmDusspJznnxBmvXqmcm+BuRAd uY46RKlPEipsnl68FCUmAUzjGpAj9uiLXFvbhyYW586KSTIPzj6KJ/HL3eyRPIuV4GpLNlKLG ueTk8K1mKpfgimNRIlFPXM/VR4HKqPfKqKZh+BQ14bAaNrPZSSScKQzfFT7VSYCMU2PhuLTo7 kYAWhUOAe1Hs+QHQC2b5Ox6VuudUCDwcx/3QThHXq6o0An7+VYUuPq1hJ/kjKcY3G7lhdazDb hAc2q0K+yMqgRy0Q2h2E/e8qVJUukZFSY4jBY1S9Gb+coVq7lIX4C8L1LK2xe9LWpVgkBuTbd WmxKZ73oC6OZ+351j6lct2RUUQ7KlXEaULspkdxUnW+XrPyVDC/+wcJR+K9QCH2ebD0GDOxmh 3H2wS9w7cFBQTJj0LkztP/GaSbOC2vbFtBFyPTuljnJJkf9m75dmWv+t+Ju/BmD+vogiiZxnA 9zFUEZoxFfd4wgk1h42GfSaz+XtMKt3EUhNQktvSooCMXhO+gJ/+NYB6B Received-SPF: pass client-ip=212.227.15.14; envelope-from=arne_bab@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: "Dr. Arne Babenhauserheide" X-ACL-Warn: , "Dr. Arne Babenhauserheide via Guix-patches" From: "Dr. Arne Babenhauserheide via Guix-patches" via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 7E17F53994 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -7.77 X-Spam-Score: -7.77 X-TUID: L51jsYc4cbrB --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, the attached patch adds the option to use `guix pack --file=3Dguix.scm` just like you=E2=80=99d use `guix build --file=3Dguix.scm` or `guix shell =2D-file=3Dguix.scm`. guix pack -f ... still means --format to preserve backwards compatibility. Only the long option --file is added. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-pack-add-file-FILE-with-the-same-meaning-as-for-guix.patch Content-Transfer-Encoding: quoted-printable From=20a1956bea3a33fed9a01246c9e5e394a7dd9daf6c Mon Sep 17 00:00:00 2001 Message-ID: From: Arne Babenhauserheide Date: Sun, 24 Nov 2024 00:32:36 +0100 Subject: [PATCH] =3D?UTF-8?q?pack:=3D20add=3D20=3DE2=3D80=3D98--file=3D3DFI= LE=3DE2=3D80=3D99?=3D =3D?UTF-8?q?=3D20with=3D20the=3D20same=3D20meaning=3D20as=3D20for=3D20guix= =3D20build?=3D MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * guix/scripts/pack.scm (%options): add --file=3DFILE, but no shorthand (that=E2=80=99s already taken for format). * doc/guix.texi (Invoking guix pack): document --file Change-Id: I87797fccdf218ead3b7f471a84034e8a8d566245 =2D-- 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 =2D-- 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}}). =20 +@item --file=3D@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=3D@var{file} @itemx -m @var{file} diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 7c5fe76fe0..d588f40257 100644 =2D-- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -28,6 +28,7 @@ =20 (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))) =20 + (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=3DFORMAT build a pack the code within FILE evaluates to"= )) (display (G_ " -f, --format=3DFORMAT 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))) =20 (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 =2D-=20 2.46.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein, ohne es zu merken. draketo.de --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmdCZ0sQHGFybmVfYmFi QHdlYi5kZQAKCRAT741FJAPD68UqD/0ZC7cUdgCi/fRdN7B4qMBPb0iPTCMERV63 I0ANDUIoYK6nyi9O0jlRwVlRg3ZgragQL8VK5kiflwXmHN9byguDauyPRZp0PtNH W/s40foSdytR7JAteWYfNYkA8acGDvKowbuskfnX3EBpy/IfAtoIkgD32yXZ61Ua lDkxySNcBCnsPi4xklflv20K2bYtdVtm9q1qhww9009fgFLwJ+CEzLsfWrQC6otS iNFDSywhevghsY0zn8PpgcKVPPRMg819UC+A0tqDOfCmHs6smsaJRbRE4TCWrQ1G sJv4PnOGmagVytXTjCOOPzDxcOwzLpgiueq8eYf92VU3sBDme51P0kuaEoshtOm2 OHs951XPpmgigIa0mXPbWgMERJMAe8jnDjRxgcD7caODzSY4op6CkXN6PMFWK3vE j5tikvPYSLtgpU7BLBOBfJYo85r9pfDY372DsT//witZThcTMELYUvnU1A0C9y+g 3n02hn6IW8uVZ33CKzgKl9LjnRxaMN3kigRrwx10wRHjbkCAzx1XbtiISyZ7XOYO muYk7QBKgETRcsS58VFl8Fi6Engk4DHDf9r0FvDizHXYTnpFH93gAGDd86gpfNkX wmXqZ1p+zTFWHpjKC70VkJsbHi8+hb0TOjBTylK27JzWQGrvGswxC38yOisbqI1r /MHdyGfzrIjEBAEBCAAuFiEE3Si95tmHXKvOSosd3M8NswvBBUgFAmdCZ0sQHGFy bmVfYmFiQHdlYi5kZQAKCRDczw2zC8EFSJmLA/9eQVfoa7xSN69KzhLjyV2+wykK XIqblg5sB/7dk9ZNzrLGrOC6SYq5tY6IgbMrKBlQbgBDmmBCCg8X7tI7YXEsi8W2 J8PcezwaHhysceFc4IYIuSFAK1EtMdfpBwhrGW7utnHe4xd9LeAnxeX+Ntk8jY9q vv8+DNNJakudiD6uEA== =H4l1 -----END PGP SIGNATURE----- --==-=-=--