Ludovic Courtès <ludo@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 21 Oct 2023 14:31:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 21 10:31:54 2023 Received: from localhost ([127.0.0.1]:44805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1quD14-0005ay-9F for submit <at> debbugs.gnu.org; Sat, 21 Oct 2023 10:31:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1quD0y-0005ab-LK for 65665 <at> debbugs.gnu.org; Sat, 21 Oct 2023 10:31:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1quD0Q-0003qN-VY; Sat, 21 Oct 2023 10:31:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=SgVRMHm2K7CmlqgIN/OE+BawIrBmC5a+0hip+TZGbWM=; b=bxANoWfHYag69KVh89SZ KjlnE+Awwz+1V8NwTvk6qbptoIkXEhbxjFys9DbYOAvELIajz/NYPcmVv8r1P8UxmXPO2NsBhV0u5 nZLzbzzOGUq1IHIFO/VX0wngPV6zK85UxktK0reVcQx1OQBKtH6fRa7KjgrOP7anQYuWZdgy4Mjzi a2M5L5ryHrK8VVadgTmIwIDn/UHUvag/hySn6C4CxIewh1pJ8NR8d4JN38cAzMaTUG6+C5DZJX8nF luax0Dmf9Y3cyPWB1ju2maybsTHN0OSzzWKqbAghe/7tEIwldsG7UvA4MEMSzwz98FV9J/cRX+Gyu 2+UbsHOb3JL+ag==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87o7h0e4us.fsf@HIDDEN> (Ulf Herrman's message of "Sun, 15 Oct 2023 02:12:43 -0500") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <871qe0lytk.fsf_-_@HIDDEN> <87wmvrdxnf.fsf@HIDDEN> <87y1g5fd1e.fsf@HIDDEN> <87o7h0e4us.fsf@HIDDEN> Date: Sat, 21 Oct 2023 16:31:08 +0200 Message-ID: <87wmvgoxn7.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Ulf Herrman <striness@HIDDEN> skribis: >> $ ./pre-inst-env guix build qgit -n --with-latest=3Dqtbase >> following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_r= eleases/qt/'... >> following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_r= eleases/qt/6.6/'... >> guix build: warning: cannot authenticate source of 'qtbase', version 6.6= .0 >> >> Starting download of /tmp/guix-file.CTehnY >> From https://mirrors.ocf.berkeley.edu/qt/official_releases/qt/6.6/6.6.0/= submodules/qtbase-everywhere-src-6.6.0.tar.xz... >> =E2=80=A6-src-6.6.0.tar.xz 46.1MiB = = 12.9MiB/s 00:04 =E2=96=95=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2= =96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96= =88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=8F 100.0% >> substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.= 0% >> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% >> substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'...= 100.0% >> substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'..= . 100.0% >> The following derivations would be built: >> /gnu/store/paixxkdaakv55bffggxx4l9hiknl8i5r-qgit-2.10.drv >> /gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv >> 0.4 MB would be downloaded: >> /gnu/store/nl9dadzfmjm9wg7v3r31jkx773dl683x-module-import-compiled >> /gnu/store/6zryxmypw0wygayc9pvhyxkx47w0lyci-gperf-3.1 >> /gnu/store/a57n7wy8mdi7l52pr4zg07132blgj5xp-qgit-2.10-checkout > > And if you do a quick 'cat > /gnu/store/paixxkdaakv55bffggxx4l9hiknl8i5r-qgit-2.10.drv'... [...] > you'll see we have both a > ("/gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv",["out"]) > and a > ("/gnu/store/hjhr64r5x3bhdw63zz3a3v09vfrlkhrh-qtbase-5.15.10.drv",["out"]) > in use. > > (and if this were a transformation that applied to all packages, it > would be using two variants of the entire world beneath qtbase also) D=E2=80=99oh! Now we have a bug to chew. (Sorry if this was obvious to you from the start; it wasn=E2=80=99t to me!) I don=E2=80=99t know, should we start by having a proper bug report for thi= s and study how this happen? Again I=E2=80=99m sorry if I=E2=80=99m slow to understand, but I=E2=80=99d = like to make sure we have a good understanding of the problem before we start discussing solutions. Thanks, Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 15 Oct 2023 07:13:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 15 03:13:38 2023 Received: from localhost ([127.0.0.1]:51142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qrvJh-0008QK-Is for submit <at> debbugs.gnu.org; Sun, 15 Oct 2023 03:13:38 -0400 Received: from tilde.club ([142.44.150.184]:39290 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qrvJe-0008QB-S1 for 65665 <at> debbugs.gnu.org; Sun, 15 Oct 2023 03:13:36 -0400 Received: by tilde.club (Postfix, from userid 5378) id E6F0522047744; Sun, 15 Oct 2023 07:13:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club E6F0522047744 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1697353989; bh=ute/3mQLNMQY6rR5Xu8eZqUo30BSnp7FM3SNEdP21HQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=xTxLfxflcCr9LSE/SLu7Txl92Br0Vh38YVfDBOr396vnott6zBF3PS62vKqpUcxaS uS6g4ca5iZS7fOrZp4JEO0SRkcw7it0oQVAR/Y3Y46o5ICkP6k6VGSsQH1iTHG+vQB O8U8tgNNgdq8S+Ieg1qNlY3F/E3PE6nY3ArBzugE= From: Ulf Herrman <striness@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <871qe0lytk.fsf_-_@HIDDEN> <87wmvrdxnf.fsf@HIDDEN> <87y1g5fd1e.fsf@HIDDEN> Date: Sun, 15 Oct 2023 02:12:43 -0500 In-Reply-To: <87y1g5fd1e.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 14 Oct 2023 17:18:21 +0200") Message-ID: <87o7h0e4us.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 65665 Cc: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.6 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Hello, > > Ulf Herrman <striness@HIDDEN> skribis: > >> That and a growing thirst for a nuclear option for package rewriting >> brought about by trying to debug deep transformations while >> simultaneously experimenting with rewriting a manifest of around 270 >> packages. > > On that topic of a catch-all option for rewriting: there=E2=80=99s an unu= sed > procedure called =E2=80=98map-derivation=E2=80=99, which performs rewriti= ng at the level > of derivations. It=E2=80=99s harder to use, more expensive, but who know= s, > perhaps we=E2=80=99ll find a motivating use case=E2=80=A6 (Allowing for = graph rewriting > has been a major goal for me since the beginning.) > >> There are really several distinct issues at play here: >> 1. The case of #:qtbase and #:guile being invisible to package-mapping. >> This is what I first noticed, and cannot be fixed without modifying >> the build systems. This is what prompted looking for packages in >> package and bag arguments, and recursing into lists therein (just in >> case an argument took a list of packages). > > How are #:qtbase and #:guile invisible to package mapping? > > They appear in the bag inputs and thus are definitely visible to > =E2=80=98package-mapping=E2=80=99, as a I showed with the CMake and Pytho= n examples in > this thread. "Invisible to package-mapping" was perhaps not the clearest phrasing; "not completely replaced by package-mapping" might be better. qtbase does indeed go in the bag inputs, but replacing the bag inputs has no effect on the bag arguments, and even if we replaced it in the bag arguments as well, it might not even be in there to begin with, in which case the bag-builder would introduce a default that is only visible at the level of derivations. > > For good measure :-) here=E2=80=99s an example with #:qtbase: > > $ ./pre-inst-env guix build qgit -n > substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > 0.4 MB would be downloaded: > /gnu/store/7b20q17yg90b62404chgbnwgvd6ry1qf-qgit-2.10 > $ ./pre-inst-env guix build qgit -n --with-latest=3Dqtbase > following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_re= leases/qt/'... > following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_re= leases/qt/6.6/'... > guix build: warning: cannot authenticate source of 'qtbase', version 6.6.0 > > Starting download of /tmp/guix-file.CTehnY > From https://mirrors.ocf.berkeley.edu/qt/official_releases/qt/6.6/6.6.0/s= ubmodules/qtbase-everywhere-src-6.6.0.tar.xz... > =E2=80=A6-src-6.6.0.tar.xz 46.1MiB = = 12.9MiB/s 00:04 =E2=96=95=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96= =88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88= =E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=8F 100.0% > substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... = 100.0% > substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'...= 100.0% > The following derivations would be built: > /gnu/store/paixxkdaakv55bffggxx4l9hiknl8i5r-qgit-2.10.drv > /gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv > 0.4 MB would be downloaded: > /gnu/store/nl9dadzfmjm9wg7v3r31jkx773dl683x-module-import-compiled > /gnu/store/6zryxmypw0wygayc9pvhyxkx47w0lyci-gperf-3.1 > /gnu/store/a57n7wy8mdi7l52pr4zg07132blgj5xp-qgit-2.10-checkout And if you do a quick 'cat /gnu/store/paixxkdaakv55bffggxx4l9hiknl8i5r-qgit-2.10.drv'... =2D----------------------------- Derive ([("out","/gnu/store/z8qrhfmicylxy2mwvcvh9sizfhd3x4d3-qgit-2.10","","")] ,[("/gnu/store/0jk33gpzyicyppbnh458213007v0qjhs-mesa-23.1.4.drv",["out"]) ,("/gnu/store/0njvvgjlb52abhqnmb4rx22sfkxm2h9c-gcc-11.3.0.drv",["out"]) ,("/gnu/store/0p1sns81qbgr8ayiv02fv4rm5drcycd7-libxdamage-1.1.5.drv",["o= ut"]) ,("/gnu/store/14a2ban238fng3c8632lrfkmz54y7m2c-binutils-2.38.drv",["out"= ]) ,("/gnu/store/1n39zcbr528b7rh9bf1pwfrm7mv8nr8m-bzip2-1.0.8.drv",["out"]) ,("/gnu/store/2pv3mjjiwh37b0m3m1hijxifnchrw76i-libpciaccess-0.16.drv",["= out"]) ,("/gnu/store/3fy3bf7wysi1n1qz9jz8xzx11sgy8m6d-git-2.41.0.drv",["out"]) ,("/gnu/store/3r0r8j76l0qvxasmb7rgn7lvpikjdyn1-libxdmcp-1.1.3.drv",["out= "]) ,("/gnu/store/4jfy1ca1d5772z15jcyk1v8wdwdcllbi-gzip-1.12.drv",["out"]) ,("/gnu/store/5nvwagz2hphvlax2bnj93smr1rgrzr8l-libx11-1.8.1.drv",["out"]) ,("/gnu/store/64vwaah2spd7q66hji6sm1j2fl6pd1rn-diffutils-3.8.drv",["out"= ]) ,("/gnu/store/6k4xxkp725r09vkn7rz2gc50asjjhpkk-xorgproto-2022.2.drv",["o= ut"]) ,("/gnu/store/91b6yraa6qax7lq7riqg1ag6lql2gfzi-tar-1.34.drv",["out"]) ,("/gnu/store/9kcv1x0lrf6fdck2j42zarxrvjzxxznv-coreutils-9.1.drv",["out"= ]) ,("/gnu/store/9piaq0aaf202r1gq7crig1cr131kx8zn-file-5.44.drv",["out"]) ,("/gnu/store/9y28bf3ywai2ybhr92c904s3cxsc8apx-libpthread-stubs-0.4.drv"= ,["out"]) ,("/gnu/store/ak17xsjb4zcw7sf0r0lxxiy4xmh57i2h-findutils-4.9.0.drv",["ou= t"]) ,("/gnu/store/bmc1hqlb207n1mnf9rs7wy8zh9hhf0br-qgit-2.10-checkout.drv",[= "out"]) ,("/gnu/store/cmd13zzya808ca8siibj8ib3llpkrr3f-sed-4.8.drv",["out"]) ,("/gnu/store/cr84vpnszpy3hkwsm8ijwpnkknxvx8k4-grep-3.8.drv",["out"]) ,("/gnu/store/cx6ws98i67qf6ba9msz7n63x78ky812c-libxxf86vm-1.1.4.drv",["o= ut"]) ,("/gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv",["out"]) ,("/gnu/store/fpprrvfiqw6g0mn5gb7ac87nbmrsq64l-make-4.3.drv",["out"]) ,("/gnu/store/g2z0fvzkh5xl4f00aixchkwxrwbbljlr-libxext-1.3.4.drv",["out"= ]) ,("/gnu/store/gb247cil5nlnx175dhqmgg67q7ng7n2h-which-2.21.drv",["out"]) ,("/gnu/store/hb2y5axynnpwqpx1znjsn5azspc9a4lw-module-import-compiled.dr= v",["out"]) ,("/gnu/store/hjhr64r5x3bhdw63zz3a3v09vfrlkhrh-qtbase-5.15.10.drv",["out= "]) ,("/gnu/store/hvqfl21wx397k58jpn5dpn2l5y5k1dl0-patch-2.7.6.drv",["out"]) ,("/gnu/store/kn7kcpkkcvy6gmrc74mf4mq0290dsf94-glibc-2.35.drv",["out","s= tatic"]) ,("/gnu/store/l3ns54f8vgqmycwi50p5cwbr6l466kj3-libdrm-2.4.114.drv",["out= "]) ,("/gnu/store/lfsv077ggq8w8cbw86wf1075zhb3bhrw-xz-5.2.8.drv",["out"]) ,("/gnu/store/lssiz5ppxfybwmr638x3bcmn4b6ixk89-linux-libre-headers-5.15.= 49.drv",["out"]) ,("/gnu/store/n4p8vzp14k1pkgxyfb5mak12rm1yiwnr-cmake-minimal-3.24.2.drv"= ,["out"]) ,("/gnu/store/nldpb7xl1slkiigvr9rax7qhcky5flnc-util-macros-1.19.3.drv",[= "out"]) ,("/gnu/store/nvaxgm6jvjy6agmp89ivahz7z9vl3ldh-libxcb-1.15.drv",["out"]) ,("/gnu/store/pdkcmkk5h3zq82ws9fps4bxnfmsmz0kx-libxshmfence-1.3.drv",["o= ut"]) ,("/gnu/store/s5nyfh0cd3z9wsk69c9blj5y850kvvcm-libvdpau-1.5.drv",["out"]) ,("/gnu/store/swblndkq2c4rzyv3xfkmsa4cjf6abphf-ld-wrapper-0.drv",["out"]) ,("/gnu/store/vkns1vij5hjamh7dpd74zs5203526747-libxfixes-6.0.0.drv",["ou= t"]) ,("/gnu/store/w2mnryfds1bd7wyyqmdi0kblz0dym1bx-glibc-utf8-locales-2.35.d= rv",["out"]) ,("/gnu/store/wwmk0rrnb5q8f48fm7h6grzar5qmslgi-libxau-1.0.10.drv",["out"= ]) ,("/gnu/store/xwckz4hbfydkfiiaa7bgslbh317gdkiq-bash-minimal-5.1.16.drv",= ["out"]) ,("/gnu/store/z7fxw9jj7avcr1ng88pak3ds3kxbfy15-gawk-5.2.1.drv",["out"]) ,("/gnu/store/zraigp7miin3vzr5dcbr4i9rvds0i07r-guile-3.0.9.drv",["out"])] ,["/gnu/store/2lg0ibv3vw01xc83advvrhvmc8yxbhh0-qgit-2.10-builder","/gnu/st= ore/p173g6kxa69qaypf8dvnw1ismd8g4k8q-module-import"] ,"x86_64-linux","/gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9/b= in/guile",["--no-auto-compile","-L","/gnu/store/p173g6kxa69qaypf8dvnw1ismd8= g4k8q-module-import","-C","/gnu/store/nl9dadzfmjm9wg7v3r31jkx773dl683x-modu= le-import-compiled","/gnu/store/2lg0ibv3vw01xc83advvrhvmc8yxbhh0-qgit-2.10-= builder"] ,[("out","/gnu/store/z8qrhfmicylxy2mwvcvh9sizfhd3x4d3-qgit-2.10")]) =2D-------------------------- you'll see we have both a ("/gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv",["out"]) and a ("/gnu/store/hjhr64r5x3bhdw63zz3a3v09vfrlkhrh-qtbase-5.15.10.drv",["out"]) in use. (and if this were a transformation that applied to all packages, it would be using two variants of the entire world beneath qtbase also) >> 2. The (perceived) case of packages hiding inside arguments. In >> hindsight, this was probably actually (3) causing this, though it's >> hard to tell because I discovered it last. I attempted to resolve >> this by recursing through <gexp>s and <gexp-input>s. > > Yeah. I think we have to understand that =E2=80=9Chiding=E2=80=9D is to = some extent > inevitable; <package> is more concise than <bag>, which is more concise > than <derivation>. There are extra =E2=80=9Cinputs=E2=80=9D showing up w= hen we go from > one abstraction to the one below. Ideally no new packages would be introduced when going from bags to derivations - there is also information at the package level that is missing at the derivation level, like properties and arguments, that transformations should be able to access. > >> 3. `this-package' referring to the inherited package in thunked fields, >> rather than the package inheriting them. This is what prompted the >> use of package-{inputs,arguments,etc}-with-package. > > Ah yes, I agree; I reported it here: > > https://issues.guix.gnu.org/50335 > > I think we can discuss it separately though, in that bug report > probably. =20 Ah, in the meantime I created issue #66510. I suppose I should merge that. I think the syntactic option presented there seems promising - extending record constructors so that (inherit parent) can be replaced with (inherit parent (fieldname variable-like-macro-name) ...) to cause uses of variable-like-macro-name within the constructor to refer to the parent's value of fieldname, with any field thunk of the parent evaluated while `this-package' is bound to the package being defined. =2D Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUrkOwUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mgTWAv+M3SCZPO5+RvL+fOfa1hVFhHkbwM7 JURJ43VQadC/I1VlPCHfAb/gJ+8aXG+Up/fkEU5tDEg2HLxwSsGRR6Ser/iAjtIC Z508AZ2Y85bdwMk+8NAJIIfrQEZb6pJJKXcH6Nls6/sVkZFgtmjxjW6aDlLC/mkg ETZQwjfcF5e5ZsimzFkLBT+B558gQDpvAtjDD42jQ10NZJOJlc0mRpeR1I3YzbMk QBy1VjdqiBFYJ1hO5VRZ3egNki6m0aTOYrPNR57ogyJ1HQHg55sPqY/ZcjKhNWAz SJHs+jX0Xvx33G9AGnS5/c71e7TxI6YDN7ANZlQMJlkUm+BBxb7yJJ+YxDflXI/A eZzCsrSRg0R+IS/QeNwmrP4f3KNcHkii8Njn7HdngZJ2SINUWa0OsXRVGN+vYwVD Ql8dMuCsigPGaObe4BgszTJdh/D7IJ066HlXfuZNTYbjTRLk5k+g0p+slfooZjQr VBakEtN4co4UQjokOM/JDzUqM+PcOehcUlZJ =NZ9m -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 14 Oct 2023 15:19:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 14 11:19:02 2023 Received: from localhost ([127.0.0.1]:50171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qrgPq-0007Ot-W5 for submit <at> debbugs.gnu.org; Sat, 14 Oct 2023 11:19:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qrgPl-0007Od-QY for 65665 <at> debbugs.gnu.org; Sat, 14 Oct 2023 11:18:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qrgPI-0002lW-Ex; Sat, 14 Oct 2023 11:18:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=WEbRZ1qTIDXXSIBF9lbT0HYqp7KnfwHa2IxGVmjDcPk=; b=mg5ErfUsBYqof8ozFt9W ZNJ1lc9Rj2ricjJ35KnZQe4pk/COehD57vg9Zg62Tsiv+V2jeqgLkw7cjyAnWv+Msf9jFfnrtiUUG 5fOElbYRwKVORC62HylyDSm9b2T5MEpstS3znF/YD8yVxGpzBqGUoUEJzHFUWjUph/SAgibje+l7D mOC5x/fem1QBQU7iVyoVS3iyzi9oizCaKQyIIlDOdm3Lc8JaKrsbkMqa9R52ZBewemk1MJ7fjDG/R hnN9I86tZ5+WCEqfuAwBxqaV8JTCQznmJGU7uX4gLcwG1WfFjELmIBLXyEqWUcs5F8uTz6vSYeYzB 5jK/BfEmB1SWJw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87wmvrdxnf.fsf@HIDDEN> (Ulf Herrman's message of "Thu, 12 Oct 2023 22:11:32 -0500") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <871qe0lytk.fsf_-_@HIDDEN> <87wmvrdxnf.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 =?utf-8?Q?Vend=C3=A9miaire?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Navet X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 14 Oct 2023 17:18:21 +0200 Message-ID: <87y1g5fd1e.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hello, Ulf Herrman <striness@HIDDEN> skribis: > That and a growing thirst for a nuclear option for package rewriting > brought about by trying to debug deep transformations while > simultaneously experimenting with rewriting a manifest of around 270 > packages. On that topic of a catch-all option for rewriting: there=E2=80=99s an unused procedure called =E2=80=98map-derivation=E2=80=99, which performs rewriting= at the level of derivations. It=E2=80=99s harder to use, more expensive, but who knows, perhaps we=E2=80=99ll find a motivating use case=E2=80=A6 (Allowing for gr= aph rewriting has been a major goal for me since the beginning.) > There are really several distinct issues at play here: > 1. The case of #:qtbase and #:guile being invisible to package-mapping. > This is what I first noticed, and cannot be fixed without modifying > the build systems. This is what prompted looking for packages in > package and bag arguments, and recursing into lists therein (just in > case an argument took a list of packages). How are #:qtbase and #:guile invisible to package mapping? They appear in the bag inputs and thus are definitely visible to =E2=80=98package-mapping=E2=80=99, as a I showed with the CMake and Python = examples in this thread. For good measure :-) here=E2=80=99s an example with #:qtbase: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build qgit -n substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% 0.4 MB would be downloaded: /gnu/store/7b20q17yg90b62404chgbnwgvd6ry1qf-qgit-2.10 $ ./pre-inst-env guix build qgit -n --with-latest=3Dqtbase following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_rele= ases/qt/'... following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_rele= ases/qt/6.6/'... guix build: warning: cannot authenticate source of 'qtbase', version 6.6.0 Starting download of /tmp/guix-file.CTehnY From https://mirrors.ocf.berkeley.edu/qt/official_releases/qt/6.6/6.6.0/sub= modules/qtbase-everywhere-src-6.6.0.tar.xz... =E2=80=A6-src-6.6.0.tar.xz 46.1MiB = = 12.9MiB/s 00:04 =E2=96=95=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96= =88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88= =E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=8F 100.0% substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... 1= 00.0% The following derivations would be built: /gnu/store/paixxkdaakv55bffggxx4l9hiknl8i5r-qgit-2.10.drv /gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv 0.4 MB would be downloaded: /gnu/store/nl9dadzfmjm9wg7v3r31jkx773dl683x-module-import-compiled /gnu/store/6zryxmypw0wygayc9pvhyxkx47w0lyci-gperf-3.1 /gnu/store/a57n7wy8mdi7l52pr4zg07132blgj5xp-qgit-2.10-checkout --8<---------------cut here---------------end--------------->8--- Now, package transformation options are almost all implemented in terms of =E2=80=98package-input-rewriting/spec=E2=80=99, and I have to admit that= it=E2=80=99s much easier to use than =E2=80=98package-mapping=E2=80=99. The latter is low-le= vel and it can be a source of headaches. > 2. The (perceived) case of packages hiding inside arguments. In > hindsight, this was probably actually (3) causing this, though it's > hard to tell because I discovered it last. I attempted to resolve > this by recursing through <gexp>s and <gexp-input>s. Yeah. I think we have to understand that =E2=80=9Chiding=E2=80=9D is to so= me extent inevitable; <package> is more concise than <bag>, which is more concise than <derivation>. There are extra =E2=80=9Cinputs=E2=80=9D showing up whe= n we go from one abstraction to the one below. > 3. `this-package' referring to the inherited package in thunked fields, > rather than the package inheriting them. This is what prompted the > use of package-{inputs,arguments,etc}-with-package. Ah yes, I agree; I reported it here: https://issues.guix.gnu.org/50335 I think we can discuss it separately though, in that bug report probably. > (1) could be resolved in several ways. I'm partial to looking for > arguments whose values are packages and transforming them (when #:deep? > #t is specified), and adjusting the build systems to make that work > consistently, which is what I've done. > > (2) is probably not an issue, though it occurs to me that the technique > of recursively searching through arguments looking for packages could be > used to implement a sort of automated "transformability" check, which > could help a lot when trying to debug transformations. OK. > (3) is a major issue; the entire strategy of using `this-package-input' > to enable transformations breaks because of it. My fix works for me at > least, though it requires exposing additional low-level procedures and > transformation authors using them. I'll open another bug about it, as > requested. Yeah, understood. Thanks, Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 14 Oct 2023 14:48:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 14 10:48:00 2023 Received: from localhost ([127.0.0.1]:50111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qrfvr-0006MJ-GI for submit <at> debbugs.gnu.org; Sat, 14 Oct 2023 10:48:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qrfvm-0006Lg-Pt for 65665 <at> debbugs.gnu.org; Sat, 14 Oct 2023 10:47:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qrfvJ-0006DE-Kw; Sat, 14 Oct 2023 10:47:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=E7q/2zIgNDuzKDYip06tbLYf28jFqsyym9he5DNPDPI=; b=GgVGIMQzZEbyIxbhsgpZ iO6tLmOSsvppdg1lod7MwNormrGUcJ+x2rbd3BihOG8NsEaXZNcuszu3dgi16ZsG9tCsJG+LLWVkl ZTlR7XeU52F9Np2E9iGagPf9JfEWzFLRjZLYr6iYe79BSORjSkQPIA+3nriG+J9/dXTmyb3TRnxVY igIqN0p+F/qsIlBDjwXEfZPDwxGaC45UbxVfXbcnkC5vOUQfab34hmj6aRsLdQTJcBmlsBBH4EMym YuJpMTMJastToqomf5Ii0Mujg4vNGM1lIWbbqSGApWPPTarogxQUECMhCb4x/JeBt6DZrjaPnDze5 0lKpjUCW8q0MVA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87h6mv96fy.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 12 Oct 2023 12:00:33 -0400") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <871qe0lytk.fsf_-_@HIDDEN> <87h6mv96fy.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 =?utf-8?Q?Vend=C3=A9miaire?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Navet X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 14 Oct 2023 16:47:22 +0200 Message-ID: <87jzrpgt1h.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: >> It=E2=80=99s indeed the case that arguments can capture references to pa= ckages >> that won=E2=80=99t be caught by =E2=80=98package-mapping=E2=80=99. For = instance, if you write: >> >> (package >> =E2=80=A6 >> (arguments (list =E2=80=A6 #~(whatever #$coreutils)))) >> >> =E2=80=A6 then =E2=80=98coreutils=E2=80=99 here cannot be replaced. >> >> To address this, the recommendation is to always add dependencies to >> input fields and to use self-references within arguments. The example >> above should be written like this: >> >> (package >> =E2=80=A6 >> (arguments >> (list =E2=80=A6 #~(whatever #$(this-package-input "coreutils"))))) >> >> It=E2=80=99s just a recommendation and one can perfectly ignore it, and I >> suppose that was the impetus for this patch. >> >> This is one of the things discussed while designing this change: >> >> https://guix.gnu.org/en/blog/2021/the-big-change/ >> (search for =E2=80=9Cself-referential records=E2=80=9D) >> >> https://issues.guix.gnu.org/49169 >> >> My take was and still is that it=E2=80=99s an acceptable limitation. Pa= ckagers >> need to follow the guideline above if they want proper support for >> rewriting, =E2=80=98guix graph=E2=80=99, and other tools. >> >> WDYT? > > But not all packages found in a bag come from inputs; they may be > provided as an argument to the build system (cmake, meson, qt, etc. all > allow for this). Yes, but these packages (#:cmake for =E2=80=98cmake-build-system=E2=80=99, = #:python for =E2=80=98python-build-system=E2=80=99, etc.) become inputs of the bag, and = are taken into account, as in this example: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix show tinyxml2 name: tinyxml2 version: 8.0.0 outputs: + out: everything systems: x86_64-linux i686-linux dependencies:=20 location: gnu/packages/xml.scm:1295:2 homepage: http://www.grinninglizard.com/tinyxml2/ license: Zlib synopsis: Small XML parser for C++=20=20 description: TinyXML2 is a small and simple XML parsing library for the C++= programming + language. $ ./pre-inst-env guix build tinyxml2 The following graft will be made: /gnu/store/qf8w8ch1mrxk6k34g2d6bisny5pq8gnv-tinyxml2-8.0.0.drv applying 2 grafts for tinyxml2-8.0.0 ... grafting '/gnu/store/ndzyiwhypsbgrbaz7rmz3649b6ghlfal-tinyxml2-8.0.0' -> '/= gnu/store/2da5frl36gd51653bjjypqvwdk0bh25v-tinyxml2-8.0.0'... successfully built /gnu/store/qf8w8ch1mrxk6k34g2d6bisny5pq8gnv-tinyxml2-8.0= .0.drv /gnu/store/2da5frl36gd51653bjjypqvwdk0bh25v-tinyxml2-8.0.0 $ ./pre-inst-env guix build tinyxml2 --with-input=3Dcmake-minimal=3Dcmake The following derivation will be built: /gnu/store/hx0hx1nrmxzdhy9yw1d0md2q78y4spd4-tinyxml2-8.0.0.drv 8.4 MB will be downloaded: /gnu/store/qwy25ivr63087x9fdl9km0m44hn5bimg-cmake-3.25.1 /gnu/store/3vh9b2i93na8wwdrj6n0q2qbgd2fzxik-tinyxml2-8.0.0-checkout [...] /gnu/store/cmn551x8iksy44cdqypyq2129lm8ym60-tinyxml2-8.0.0 --8<---------------cut here---------------end--------------->8--- (In this case I had to apply the patch below because =E2=80=98cmake-minimal= =E2=80=99 was mistakenly marked as hidden which, as implemented by eee95b5a879b7096dffd533f24107cf8926b621e, meant that it could not be replaced.) I gave a similar example with =E2=80=98python-build-system=E2=80=99 here: https://issues.guix.gnu.org/65665#10 My understanding is that understanding is that this patch series is about addressing cases as I explained above, where =E2=80=98arguments=E2=80= =99 refer to packages directly instead of using self references. Do I get this right, Ulf? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index bc14286070..1592703f8d 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -263,6 +263,7 @@ (define-public cmake-minimal (package (inherit cmake-bootstrap) (name "cmake-minimal") + (properties (alist-delete 'hidden? (package-properties cmake-bootstrap))) (source (origin (inherit (package-source cmake-bootstrap)) ;; Purge CMakes bundled dependencies as they are no longer needed. --=-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 13 Oct 2023 03:12:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 23:12:17 2023 Received: from localhost ([127.0.0.1]:44518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qr8b2-0007LU-LS for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 23:12:17 -0400 Received: from tilde.club ([2607:5300:204:4340::114]:39164 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qr8az-0007LJ-Tw for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 23:12:15 -0400 Received: by tilde.club (Postfix, from userid 5378) id F17102204ECD3; Fri, 13 Oct 2023 03:11:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club F17102204ECD3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1697166708; bh=Y2J1UJmc8+760t42UzsPJ0oJkdYYEYKE+KFervDcklM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=poGPQlGCUDBaAgvlvMoLJxptJLxUZw9nr/9POKMqSSUragHwhmNnFRW3HPH+6yGLl eL0PmZetDrERfTT6C+j4oje6TJoXcO5LrsTVlWz6Dt+PPfQko+gZEp9oCEx+LjXEa2 FD1YpgG9c2yAE5wrOVcolofDwNn0VCyG0ITRXujg= From: Ulf Herrman <striness@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <871qe0lytk.fsf_-_@HIDDEN> Date: Thu, 12 Oct 2023 22:11:32 -0500 In-Reply-To: <871qe0lytk.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 12 Oct 2023 16:06:47 +0200") Message-ID: <87wmvrdxnf.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Ulf Herrman <striness@HIDDEN> skribis: > >> -(define (build-system-with-package-mapping bs rewrite) >> +(define (build-system-with-package-mapping bs rewrite-input rewrite-arg= ument) >> "Return a variant of BS, a build system, that rewrites a bag's inputs= by >> passing them through REWRITE, a procedure that takes an input tuplet and >> returns a \"rewritten\" input tuplet." >> @@ -1442,9 +1442,10 @@ (define (build-system-with-package-mapping bs rew= rite) >> (let ((lowered (apply lower args))) >> (bag >> (inherit lowered) >> - (build-inputs (map rewrite (bag-build-inputs lowered))) >> - (host-inputs (map rewrite (bag-host-inputs lowered))) >> - (target-inputs (map rewrite (bag-target-inputs lowered)))))) >> + (build-inputs (map rewrite-input (bag-build-inputs lowered))) >> + (host-inputs (map rewrite-input (bag-host-inputs lowered))) >> + (target-inputs (map rewrite-input (bag-target-inputs lowered))) >> + (arguments (map rewrite-argument (bag-arguments lowered)))))) > > Aah, now I understand. :-) > > It=E2=80=99s indeed the case that arguments can capture references to pac= kages > that won=E2=80=99t be caught by =E2=80=98package-mapping=E2=80=99. For i= nstance, if you write: > > (package > =E2=80=A6 > (arguments (list =E2=80=A6 #~(whatever #$coreutils)))) > > =E2=80=A6 then =E2=80=98coreutils=E2=80=99 here cannot be replaced. > > To address this, the recommendation is to always add dependencies to > input fields and to use self-references within arguments. The example > above should be written like this: > > (package > =E2=80=A6 > (arguments > (list =E2=80=A6 #~(whatever #$(this-package-input "coreutils"))))) > > It=E2=80=99s just a recommendation and one can perfectly ignore it, and I > suppose that was the impetus for this patch. That and a growing thirst for a nuclear option for package rewriting brought about by trying to debug deep transformations while simultaneously experimenting with rewriting a manifest of around 270 packages. There are really several distinct issues at play here: 1. The case of #:qtbase and #:guile being invisible to package-mapping. This is what I first noticed, and cannot be fixed without modifying the build systems. This is what prompted looking for packages in package and bag arguments, and recursing into lists therein (just in case an argument took a list of packages). 2. The (perceived) case of packages hiding inside arguments. In hindsight, this was probably actually (3) causing this, though it's hard to tell because I discovered it last. I attempted to resolve this by recursing through <gexp>s and <gexp-input>s. 3. `this-package' referring to the inherited package in thunked fields, rather than the package inheriting them. This is what prompted the use of package-{inputs,arguments,etc}-with-package. (1) could be resolved in several ways. I'm partial to looking for arguments whose values are packages and transforming them (when #:deep? #t is specified), and adjusting the build systems to make that work consistently, which is what I've done. (2) is probably not an issue, though it occurs to me that the technique of recursively searching through arguments looking for packages could be used to implement a sort of automated "transformability" check, which could help a lot when trying to debug transformations. (3) is a major issue; the entire strategy of using `this-package-input' to enable transformations breaks because of it. My fix works for me at least, though it requires exposing additional low-level procedures and transformation authors using them. I'll open another bug about it, as requested. > This is one of the things discussed while designing this change: > > https://guix.gnu.org/en/blog/2021/the-big-change/ > (search for =E2=80=9Cself-referential records=E2=80=9D) > > https://issues.guix.gnu.org/49169 > > My take was and still is that it=E2=80=99s an acceptable limitation. Pac= kagers > need to follow the guideline above if they want proper support for > rewriting, =E2=80=98guix graph=E2=80=99, and other tools. > > WDYT? I think it's probably reasonable, though I would like it if there were tooling in place to detect cases where said guidelines are not followed, so as to aid in debugging and verifying that a transformation worked as intended. =2D Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUotWQUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mgcHQv/cLA17ks/VPFW1MKvakcWKjbhqOya ZoJcYoUsCporAu8xONfRKpZ3sSWPwbL4I/WS57DClxkYO5Xf3f5pgH5xJo24CT3h gkorqQikxsoAUhfuLeoG9HchGrA+SX0MJIEQkCv0Fg7YXc4imsHAH97EOPnwy3L3 dslCDKLFLTJMDhnFLHOksaeAFlQUqhDNHnu6v8AhGVcvS5Vqxq0KkJwWS4knggzX jvC+tO/JVRyXrxvvUVTtCCyXGvv6r9VA0KAXbwRT2FbII7DkfQBA1/xA8tkKOmCi QgC4VddTd2poemWeUKL9RPeWv7VhhrTXyxFKssu5SMyo0Y1apcbBCstk9Py+FvSP YUWzjZwUy1eKFax7WIXpTIE8KpRWjkOX0Rnb9ES3f4T+lbQ13O9Mb0Kjg6HLxV8K Q7mvQ8P9H5rXWSE7AbnGXB+UlO+Jmlkxc2XBzxc7Zv7QHCinSiG04efZdSlPPSW+ wfA+Q7UdrkjBqZ7lWoa8PXNgKSWtvlb3YP/j =lzX7 -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 13 Oct 2023 01:50:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 21:50:16 2023 Received: from localhost ([127.0.0.1]:44507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qr7Jg-0005Ot-GP for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 21:50:16 -0400 Received: from tilde.club ([142.44.150.184]:42110 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qr7Jb-0005Oh-8v for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 21:50:14 -0400 Received: by tilde.club (Postfix, from userid 5378) id 401BC2204ECD3; Fri, 13 Oct 2023 01:49:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 401BC2204ECD3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1697161787; bh=jUh5U8Z/1V6ei3yssYGUlR1c8cQjHNiMgtgLwH3BsLk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Jwz388PZWvUyXHCkAih1MJVHRgy7rOgKR3AYbTUAjNCCs5nkyzMC85pZNv3gt+Cae Qy8ZN6kycDp+P3jsWw28DQNbZ93Ks/hveC/IfxFA8bqLvER1ps8PXvhSNuyRsBZw8I iG9Q0GgTopQAtGPDXlfcsPPxht1GkdZTNMV5DeOM= From: Ulf Herrman <striness@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs References: <87h6ofufy5.fsf@HIDDEN> <87cyxklzgg.fsf@HIDDEN> <87lec796rc.fsf@HIDDEN> Date: Thu, 12 Oct 2023 20:49:25 -0500 In-Reply-To: <87lec796rc.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 12 Oct 2023 11:53:43 -0400") Message-ID: <871qdzfg0q.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > Any build system accepting package as arguments are subject to this > problem, if I understand correctly. It's not quite everywhere a package is accepted as an argument: there are many cases where a package is passed as a package argument but doesn't end up in the arguments list of the corresponding bag. This is usually the case because that argument is only overriding a default package that is just added as an input to the bag, with no special treatment aside from being an implicit input. For example, #:cmake in cmake-build-system works this way. This is however not the case for #:qtbase in qt-build-system, and, much more prominently, for #:guile. Neither qtbase nor guile are added to bag inputs implicitly, but they do end up in the final builder, even if not specified. Concretely, this looks like this: --------------------------------- (use-modules (guix packages) (guix profiles) (gnu packages base)) (define guile-named-lyle (package (inherit (default-guile)) (name "lyle"))) ;; contrived example that only replaces hello's immediate dependencies (define hello-transformer (package-mapping (lambda (p0) (if (eq? p0 (default-guile)) guile-named-lyle p0)) (lambda (p) (not (eq? p hello))) #:deep? #t)) (define hello-with-lyle (hello-transformer hello)) (packages->manifest (list hello hello-with-lyle)) ;; $ guix build --derivations --manifest=THISFILE ;; Expectation: build for hello-with-lyle is done with guile-named-lyle. ;; Reality: derivation for hello-with-lyle is the same as hello. --------------------------------- (and I have confirmed that the above results in guile-named-lyle being used with the proposed patches applied) A similar problem manifests when one tries replacing (default-qtbase) in a package using qt-build-system. Both it and guile are in bag arguments and not inputs because it's not enough that they be included as inputs, the builder must also know which one is considered "used by the build system" if there are multiple. One could argue that this ambiguity also exists with other build systems - "which cmake should be used, which gcc should be used", etc - but they choose to resolve it with "eh, whatever shows up first in PATH matching the required name is probably fine". It's not unimaginable that there could be cases where explicitly specifying which package should be used for a particular role would be necessary, though. - Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUooikUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mgZ3gv+N+aiM4gJM3swNUPoc5C7QWKvgkU8 V0svynQ/4gFjHqDmqCBNzttgG4Cnquv7wm6RT8/U+PyifBCNzSsdRUmh/aGaajQy NLB4rIQ3Db8Secgg416bMULcCRyabgGyYH7Yx4LfBq5vI1WJ8vknJ6h/SeBhkqnP fPHzwaAO8L53GmlidlVkvYir8uLzr5I/si6Odzl6ewD2uT5K3DkGNwgqK5fD2HOz o/dIa355lBxia/mXtTcY/cXcnr5F8skLJvGOZWkWn8pAzBz++DkS8tZPzW9mMwiM VG/KKGT5mbEB2LvGajUh4u8dhVLlMIrCzT4HbH49GgrRBNfOl/IzdybZtBITlKHR 6g5K8aOWcBxGeBeuGY6N6if22fVUYDczseFNI5GicV15YPA6FgTTjgKUCNg3mYmU HuNzR5RDwvXYXEKLD6ICm1vOtbOwrAS6yVyiuZFtaBKBXoI+uazJxH/r/anCTjar Nwb5xoLqjDsPSZzBfynl/xMF9nnHNYc+Y22o =OGXK -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 16:01:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 12:01:12 2023 Received: from localhost ([127.0.0.1]:44185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqy7b-00028a-Dd for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 12:01:12 -0400 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:59490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qqy7T-0001vU-Em for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 12:01:09 -0400 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-41954a3e282so6700131cf.2 for <65665 <at> debbugs.gnu.org>; Thu, 12 Oct 2023 09:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697126435; x=1697731235; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OEKMyAs9xEFfdtGzTFwVd/gG83Kanazg5dYnaMCiQsU=; b=OKFoAlRDLyTs7yZ5NwsxPcYSK/15TS+6lLzUgMn1UpB1xs3hTvkVvBVNL83U8QFUN9 +NVpuCswLXtIfIuMBYJ4QsajZeIJ0GaSf3WjQZGbUbmOi+mR5sf94aHnjGdY96g1Btzu G0ouipevdyN2KJrIP8yQ6N3nupP3RlEqSxBWDL5e5aHBBYzOhz8yF1F/NrI9HqPG1XZR htKNeTfchFcgA+EngqQiJnEnd1Kz7s9qi3NAghOOQkNb9QFs9zOVO2KhAWAHtwTTE2qn gX/7QiG91ReC8W78rTUPZ0AOqAbXlWCpU08xcLeSwTics5j6UyYhLZAhAgmsWT2xnILc oY1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697126435; x=1697731235; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OEKMyAs9xEFfdtGzTFwVd/gG83Kanazg5dYnaMCiQsU=; b=YUM609dkPTEEq2picOD32FdScT/pq39WxmJ9OX3CqqQ9ZE30U+jHT0YuQCddLjXkx4 aO/i3ln6Frjs8iAsp41sDguhZ/w24CNn1OB8pvAE7GOmP3usfsG/s/926XrMFIoQzNVs Asv5UCgc1tAFsY76HlIca9PWFiyC+cUPzQxGj6ZaG4IDV7O6jmZlQt8mfWVwMJPM9LpQ 9CH3coxLBMu9qe5fbB5c5AOaHadszTqmuaR0mwpNBpW4wYDXXSOdqdg5AKduyHZoPGrD cADsujOafYPlmdW/zKSFFoyCgUkV3MWpG47NWiT3/3ynrA3dpbtJMQPaKB+XoZ4b3n57 3XIQ== X-Gm-Message-State: AOJu0YyOcseojWRtX9mU7RlMFUcskbbhAphFiHqVeupLqvGKHq9IHFFJ ltEfubheZGUQF5oOi5/+lcwX9HfUmUmk1A== X-Google-Smtp-Source: AGHT+IGRxchp1iRgZcQL4fw7exuXgzNHUEBrHIAEfCknAIZ9mw55BQ0XDswxo9DRgFPV90dAP0CsBQ== X-Received: by 2002:a05:6214:519d:b0:658:8767:8d50 with SMTP id kl29-20020a056214519d00b0065887678d50mr28816843qvb.24.1697126434855; Thu, 12 Oct 2023 09:00:34 -0700 (PDT) Received: from hurd (dsl-10-128-66.b2b2c.ca. [72.10.128.66]) by smtp.gmail.com with ESMTPSA id r6-20020a0c8d06000000b0065655bb349csm6704635qvb.141.2023.10.12.09.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 09:00:34 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <871qe0lytk.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 12 Oct 2023 16:06:47 +0200") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <871qe0lytk.fsf_-_@HIDDEN> Date: Thu, 12 Oct 2023 12:00:33 -0400 Message-ID: <87h6mv96fy.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Ulf Herrman <striness@HIDDEN> skribis: > >> -(define (build-system-with-package-mapping bs rewrite) >> +(define (build-system-with-package-mapping bs rewrite-input rewrite-arg= ument) >> "Return a variant of BS, a build system, that rewrites a bag's inputs= by >> passing them through REWRITE, a procedure that takes an input tuplet and >> returns a \"rewritten\" input tuplet." >> @@ -1442,9 +1442,10 @@ (define (build-system-with-package-mapping bs rew= rite) >> (let ((lowered (apply lower args))) >> (bag >> (inherit lowered) >> - (build-inputs (map rewrite (bag-build-inputs lowered))) >> - (host-inputs (map rewrite (bag-host-inputs lowered))) >> - (target-inputs (map rewrite (bag-target-inputs lowered)))))) >> + (build-inputs (map rewrite-input (bag-build-inputs lowered))) >> + (host-inputs (map rewrite-input (bag-host-inputs lowered))) >> + (target-inputs (map rewrite-input (bag-target-inputs lowered))) >> + (arguments (map rewrite-argument (bag-arguments lowered)))))) > > Aah, now I understand. :-) > > It=E2=80=99s indeed the case that arguments can capture references to pac= kages > that won=E2=80=99t be caught by =E2=80=98package-mapping=E2=80=99. For i= nstance, if you write: > > (package > =E2=80=A6 > (arguments (list =E2=80=A6 #~(whatever #$coreutils)))) > > =E2=80=A6 then =E2=80=98coreutils=E2=80=99 here cannot be replaced. > > To address this, the recommendation is to always add dependencies to > input fields and to use self-references within arguments. The example > above should be written like this: > > (package > =E2=80=A6 > (arguments > (list =E2=80=A6 #~(whatever #$(this-package-input "coreutils"))))) > > It=E2=80=99s just a recommendation and one can perfectly ignore it, and I > suppose that was the impetus for this patch. > > This is one of the things discussed while designing this change: > > https://guix.gnu.org/en/blog/2021/the-big-change/ > (search for =E2=80=9Cself-referential records=E2=80=9D) > > https://issues.guix.gnu.org/49169 > > My take was and still is that it=E2=80=99s an acceptable limitation. Pac= kagers > need to follow the guideline above if they want proper support for > rewriting, =E2=80=98guix graph=E2=80=99, and other tools. > > WDYT? But not all packages found in a bag come from inputs; they may be provided as an argument to the build system (cmake, meson, qt, etc. all allow for this). --=20 Thanks, Maxim
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 15:54:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 11:54:16 2023 Received: from localhost ([127.0.0.1]:44178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqy0u-0007mq-8R for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 11:54:16 -0400 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:45222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qqy0s-0007me-0F for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 11:54:15 -0400 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3ae2ec1a222so643595b6e.2 for <65665 <at> debbugs.gnu.org>; Thu, 12 Oct 2023 08:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697126025; x=1697730825; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QkiMX3WtFMXOOENfpzQb34/c9SGfEMdK88NmfjfXCrQ=; b=S7QQspZHqdFwaZ7LQBg5hFIwRhQVtpdnd7YD1xRki5RbCYncit/B3AKWaJyIWjh+vD jgQqyiEh/hC01Z9qra5iTbN1SpaM+3KNmoBmasquObN7wVj/pWlHxoeW1Kj+ALIXrPnL 3qZ5QBevQqpBEQ/7KqVyTY2eqkfsVn8f4G2aMEpInbdB5dDs0zM24WKnN/7TASF3j5Er T92WXYr8+s4BaqpYj5M0D4lHAo0xzA2pZn0brmJi9+S+dAHyqBQ/Lcus977kzYCgYhUE 4cr2PpqCQno3zJaOiP0BsSuhpVLGbpEh3oYbFlkXpgVCEm4evUKP6nPEtw2giwAV2Pui riFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697126025; x=1697730825; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QkiMX3WtFMXOOENfpzQb34/c9SGfEMdK88NmfjfXCrQ=; b=MnlfR/AXyf/FLjCNTAL8tRR/XelQ1r2VKlAXZBNUJ/dPQOUZI8w05WDf7hnHTSfPm1 1e5fq4F4ZLfhCoQ+MXp4xRfY3rRnsX2LnnQOLtxf6TyW+aZFVcYaICdiH5eqHQeYyI8f vcEVTG2jHEG9SArHGPrTGil49Qk7Ns8+AlQBrBYftaC13zQzdiMfpUJu/R3tGuh5lRKy MLbHEy0l8xeAvto3C9kq+e7PFpr4kSnkyY5DIhbn9noHHAnOkDrVqBb4rzUjB6JhISjk BveZJUg4L0CFh5FfUxZgL6eWtNaeyF5WV0CwSF1Iaubj/nzJbl77LE4MTl3/F2xJW6zQ QYlA== X-Gm-Message-State: AOJu0YyBSK0nWmuNv/sOuAy3iv+V+xwlPQZnuQBqnb/u8m71wJxLwfaZ GvqAj40p3AXo2EvB9M0GeRD2L9/77bEC8A== X-Google-Smtp-Source: AGHT+IEzLOvAalnWO6JHEUzVo+uy+HGRa4lWYRZOyl7POht7xXqkRUiv8ttygDn9gCDWsw6YzB3DMg== X-Received: by 2002:a05:6808:2985:b0:3b0:d583:dc4 with SMTP id ex5-20020a056808298500b003b0d5830dc4mr14109115oib.54.1697126025394; Thu, 12 Oct 2023 08:53:45 -0700 (PDT) Received: from hurd (dsl-10-128-66.b2b2c.ca. [72.10.128.66]) by smtp.gmail.com with ESMTPSA id ne16-20020a056214425000b0066d1540f9ecsm638272qvb.77.2023.10.12.08.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 08:53:44 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87cyxklzgg.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 12 Oct 2023 15:53:03 +0200") References: <87h6ofufy5.fsf@HIDDEN> <87cyxklzgg.fsf@HIDDEN> Date: Thu, 12 Oct 2023 11:53:43 -0400 Message-ID: <87lec796rc.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Hi Ulf, > > Ulf Herrman <striness@HIDDEN> skribis: > >> In short, the current approach of having the build-system lower >> procedure leave the arguments mostly unchanged and letting the >> bag->derivation procedure (the "bag builder") fill in lots of defaults >> means that there are implicit inputs that cannot be touched at the >> package level without adding special logic for every single build system >> that does something like this. > > Could you share an example of what is fixed by these changes? Ulf had mentioned the problems they were facing in the original post of this issue: > The problem with this approach is that it doesn't affect the bag > arguments. This means that packages passed in as arguments may still > end up being used without being transformed. Worse still, packages > *not* passed in as arguments may end up being used *unless one is > explicitly passed in as an argument*, as is the case with > qt-build-system's #:qtbase argument. Examples would be an Qt packages, or packages using #:meson meson-variant. Any build system accepting package as arguments are subject to this problem, if I understand correctly. I hope that helps, --=20 Thanks, Maxim
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 14:44:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 10:44:31 2023 Received: from localhost ([127.0.0.1]:44055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqwvO-000526-Mw for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 10:44:31 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:41374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zimon.toutoune@HIDDEN>) id 1qqwvI-00051a-HI for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 10:44:26 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40651b22977so2660645e9.1 for <65665 <at> debbugs.gnu.org>; Thu, 12 Oct 2023 07:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697121836; x=1697726636; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=rGP2rFnPAhv0g3ZKwsBNFrPMnIrLWbcaGO0QDdnmBVc=; b=eD6VyLv7AYSjtbEJj9/v8MuPk3c4Mzs4jGlCb8Gw/BJH75qXJ25aqbDlkT/5cySN3q ePE88S0o/3hgbeCqoeZdo2EXjIL4a23/ig0QUIn5optLLDj3G18ToYcr1dvRnzIfCMo1 0B0zQUJm3nYDBx+liHM1jzByX/2cQpTl3XSOKIO2I1SNuTsK53RChHjnWIF0KTd+n1qn AP6T/qkVLn66WKU/zvqn9P8OWtgmi8bkl3rDW4e54IkU12+PMsrQfDBYx/TbuPoxaq6x tp6kmhyEskSDDdv0oWv8gawkcR0OunOZ8fvOX/R77GakQMd71V+EYYfetldEGjkA794C l2Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697121836; x=1697726636; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rGP2rFnPAhv0g3ZKwsBNFrPMnIrLWbcaGO0QDdnmBVc=; b=Jmx8eSjI4WQhFdeFH3wWDJuTuXKHLk9vMj2DLBU/FWGCavNA1Prf3Etb70gYc5Lpxs ZoTZMr3MLfTiBb0HZtm0H/9nq0FM1YF4Y0q2kX1qzUnAcPh2kIHwn5FIKqznP59PHZtU D6SyqhmUxqzGx7dVvMXEmBWNFERTYxxdLS/2qhvQ77TaXmtlcxoKaFmcmMF3bBV+3A5b p478fx1ke1DJ7ZhC3f+38RCsUAxqguWZr+ACjyz2bg6BAvqeBrScurOsSL26aVv2e62q NrMDZa9WWQzQa1prNMNi7OOYk6PfTmtau02r75nrRgn1u/FC8eVnkfTJRJKzfaFy98rJ uVvQ== X-Gm-Message-State: AOJu0Yzl1Uua1+Ta8B9C/TwuXe6uYFJayKVMaaZxil22PTYsl6+BEFuW 3ixC3L4pCboH4+VXvvH6sxg= X-Google-Smtp-Source: AGHT+IGCrTXnRIhSaGfdluRYVsY4wP/Qzs9ngK31b3pP0AsUxDn4OXf43U5Qvr6DLEXHXOhTc0iLXQ== X-Received: by 2002:a05:600c:3b9a:b0:3fe:21a6:a18 with SMTP id n26-20020a05600c3b9a00b003fe21a60a18mr21800062wms.3.1697121836347; Thu, 12 Oct 2023 07:43:56 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id h19-20020a05600c261300b00405442edc69sm21744wma.14.2023.10.12.07.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 07:43:56 -0700 (PDT) From: Simon Tournier <zimon.toutoune@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: [PATCH] Really get all the implicit inputs. In-Reply-To: <87a5swlbnp.fsf@HIDDEN> References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <87a5swlbnp.fsf@HIDDEN> Date: Thu, 12 Oct 2023 16:22:43 +0200 Message-ID: <86cyxj3op8.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: dev@HIDDEN, othacehe@HIDDEN, ludo@HIDDEN, me@HIDDEN, 65665 <at> debbugs.gnu.org, rekado@HIDDEN, guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Maxim, On Thu, 05 Oct 2023 at 22:36, Maxim Cournoyer <maxim.cournoyer@HIDDEN> wrote: > I've reviewed it, and it makes sense to me. I'd like to apply it to the > core-updates branch. Core team, what say you? Well, I am not sure to deeply understand some details to get all the implications here, so I have nothing relevant to say. For instance, from my understanding, the core change is: --8<---------------cut here---------------start------------->8--- + (define (rewrite-argument arg) + (match arg + ((? package? p) + (replace p)) + ((? gexp-input? gi) + (gexp-input (rewrite-argument (gexp-input-thing gi)) + (gexp-input-output gi) + #:native? (gexp-input-native? gi))) + ((? gexp? gxp) + (make-gexp (map rewrite-argument (gexp-references gxp)) + (gexp-self-modules gxp) + (gexp-self-extensions gxp) + (gexp-proc gxp) + (%gexp-location gxp))) + ((lst ...) + (map rewrite-argument lst)) + (_ + arg))) --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- + (arguments + (match p + (($ <package> _ _ _ _ args-proc) + ;; If we let ARGS-PROC be passed its original package, + ;; we somehow end up in an infinite (or maybe just + ;; exponential? Never seen it end...) loop. Should + ;; probably figure out what's causing that at some + ;; point. + (let ((args (args-proc this-package))) + (if deep? + (map rewrite-argument args) + args))))) --8<---------------cut here---------------end--------------->8--- and I do not feel enough skilled here for getting the implications. Equally for this kind of changes: --8<---------------cut here---------------start------------->8--- - (arguments (strip-keyword-arguments private-keywords arguments))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) --8<---------------cut here---------------end--------------->8--- Therefore, I trust other opinions or I need some time for diving and filling some gaps. Cheers, simon
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 14:07:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 10:07:42 2023 Received: from localhost ([127.0.0.1]:43920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqwLl-0003jq-TD for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 10:07:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qqwLj-0003jR-EB for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 10:07:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qqwLH-0008G4-GR; Thu, 12 Oct 2023 10:07:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=R0HQ8e9ZJEFkFWYJ2k7MtzgMuUfC2a615TAvrKdiSgk=; b=ibVUfJdzNqAnfPDe6Taf /K5VpFwmJyLzTQkbJm4Q6uY2pOG+SZsqLakgsTYlC3MhEChtrV8yxIbiWuUJQZdb1T/naF83aklyx KjpH99VM6kBTiZmM05ZaUTwvM1MUhAl0E4DTensoDhGWy3A4zAZijeEGp3gKAQR2LMBDizVVygL11 D0TCFlPwUdl86+mT+LPmcKdP30LUgojd4MvST0rUFw3CtUdNq9tDpVisQpeBctoWdNQ6LVq4eoRYg zRcHctXGsV22FFXULyR+BuSDMr8ktzMqDxz5F/KtDWaVRXBYRYiLEWYhusf5+GOSKnOhWju9QGJmi EIzeJ8AXSQkYpQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87msxmqwng.fsf@HIDDEN> (Ulf Herrman's message of "Sat, 16 Sep 2023 04:45:23 -0500") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> Date: Thu, 12 Oct 2023 16:06:47 +0200 Message-ID: <871qe0lytk.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ulf Herrman <striness@HIDDEN> skribis: > -(define (build-system-with-package-mapping bs rewrite) > +(define (build-system-with-package-mapping bs rewrite-input rewrite-argu= ment) > "Return a variant of BS, a build system, that rewrites a bag's inputs = by > passing them through REWRITE, a procedure that takes an input tuplet and > returns a \"rewritten\" input tuplet." > @@ -1442,9 +1442,10 @@ (define (build-system-with-package-mapping bs rewr= ite) > (let ((lowered (apply lower args))) > (bag > (inherit lowered) > - (build-inputs (map rewrite (bag-build-inputs lowered))) > - (host-inputs (map rewrite (bag-host-inputs lowered))) > - (target-inputs (map rewrite (bag-target-inputs lowered)))))) > + (build-inputs (map rewrite-input (bag-build-inputs lowered))) > + (host-inputs (map rewrite-input (bag-host-inputs lowered))) > + (target-inputs (map rewrite-input (bag-target-inputs lowered))) > + (arguments (map rewrite-argument (bag-arguments lowered)))))) Aah, now I understand. :-) It=E2=80=99s indeed the case that arguments can capture references to packa= ges that won=E2=80=99t be caught by =E2=80=98package-mapping=E2=80=99. For ins= tance, if you write: (package =E2=80=A6 (arguments (list =E2=80=A6 #~(whatever #$coreutils)))) =E2=80=A6 then =E2=80=98coreutils=E2=80=99 here cannot be replaced. To address this, the recommendation is to always add dependencies to input fields and to use self-references within arguments. The example above should be written like this: (package =E2=80=A6 (arguments (list =E2=80=A6 #~(whatever #$(this-package-input "coreutils"))))) It=E2=80=99s just a recommendation and one can perfectly ignore it, and I suppose that was the impetus for this patch. This is one of the things discussed while designing this change: https://guix.gnu.org/en/blog/2021/the-big-change/ (search for =E2=80=9Cself-referential records=E2=80=9D) https://issues.guix.gnu.org/49169 My take was and still is that it=E2=80=99s an acceptable limitation. Packa= gers need to follow the guideline above if they want proper support for rewriting, =E2=80=98guix graph=E2=80=99, and other tools. WDYT? Thanks, Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 13:53:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 09:53:36 2023 Received: from localhost ([127.0.0.1]:41443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqw88-0002e5-2U for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 09:53:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qqw86-0002dt-3T for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 09:53:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qqw7e-0005TC-BE; Thu, 12 Oct 2023 09:53:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=m9vT+4cXbJOGCwAGa7NZv7O0M/4seo86SM8i1ECyMms=; b=DJwGlFrNCJtpPz5L+zA6 p0h63ySwVzCYdCRghjF/Yz6GemmWr9oIKJ5jdQ/az/6lco88FlCET8BS89q09x89LJsLR9oY6l+fp iauE0PEI4I/eKXmkVx/tot5ZKalcVg3fYAervw+ncAq9Mp85kDNR9cDO7ofhkihJ8ZjO3f7/A9KBl rJ/ZU5ps8VYVshv3mWJnSMKZtcFUP/XAhIVBPHc2EEFOLY8bNGFNFzQBtK/IaddW3gVFFIEMkfa+Y Gxjc6++DCWSR4WGuX5Hyt1sk8G0eLl9KP3yvDVVpMCmz2v0HpC1S6esf9mfJ6mrpQ7W4fswmq+tAj veeQIToFIbS6Mg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87h6ofufy5.fsf@HIDDEN> (Ulf Herrman's message of "Thu, 31 Aug 2023 15:14:58 -0500") References: <87h6ofufy5.fsf@HIDDEN> Date: Thu, 12 Oct 2023 15:53:03 +0200 Message-ID: <87cyxklzgg.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Ulf, Ulf Herrman <striness@HIDDEN> skribis: > In short, the current approach of having the build-system lower > procedure leave the arguments mostly unchanged and letting the > bag->derivation procedure (the "bag builder") fill in lots of defaults > means that there are implicit inputs that cannot be touched at the > package level without adding special logic for every single build system > that does something like this. Could you share an example of what is fixed by these changes? Let=E2=80=99s take =E2=80=98python-itsdangerous=E2=80=99 as an example. It= has zero inputs, only implicit dependencies, yet I can do this: --8<---------------cut here---------------start------------->8--- $ guix build python-itsdangerous -n substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% 0.0 MB would be downloaded: /gnu/store/yhvhrmqd5znjs7vsq8kc55nc3rkg4w6x-python-itsdangerous-2.0.1 $ guix build python-itsdangerous --with-input=3Dpython=3Dpython2 -n The following derivations would be built: /gnu/store/b1hji2qzdiwfg2wx11l1fyjrgiy0f50v-python-itsdangerous-2.0.1.drv /gnu/store/5gibs6x75acc6j0g0rh8m66191l9wq12-python-wrapper-3.10.7.drv 0.1 MB would be downloaded: /gnu/store/b2qv97jbih850zn35b2j84n2acj079cv-itsdangerous-2.0.1.tar.gz $ guix gc --references /gnu/store/5gibs6x75acc6j0g0rh8m66191l9wq12-python-w= rapper-3.10.7.drv |grep python /gnu/store/n0snl506x5bbs5c2496blh79yil3pf44-python2-2.7.18.drv /gnu/store/whwrah24q7syyiqra16sm9mjvdxld1pv-python-wrapper-3.10.7-builder --8<---------------cut here---------------end--------------->8--- =E2=80=98python=E2=80=99 above is an implicit dependency, yet it was suitab= ly replaced by =E2=80=98--with-input=E2=80=99. In what cases does =E2=80=98package-mapping #:deep? #t=E2=80=99 miss implic= it inputs? Thanks, Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 13:48:08 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 09:48:08 2023 Received: from localhost ([127.0.0.1]:41438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqw2q-0002Vl-Bu for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 09:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qqw2m-0002V4-0Y for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 09:48:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qqw2J-0004IC-LP; Thu, 12 Oct 2023 09:47:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=OJ4xzghA0S9v3aPTuwcrpQ3ZPlsxueASWeYFS5Ww0w4=; b=Xv1WVi7ZhbGrGocrxDSf xvYRFnNMXl4KvYEVIUYfvIXqq5k6USw9Eo8ZQ7HBeNawnfe7TilHBhlcae8ke5cfM5IZBle/JNJSS qo6p5MYLkgtXZgb8ys6k+xPY94wRlFGMQ7cCPcT4wp/tmxfgeP0H9gKP/BXz5CwqEuy1tWlFoOYI7 pjUmX7CipcpWXy0JQXzXK5LtBa1uYy6kWrsyvXwGiKe99xQgNHj4QbYI1cGn+EmJKtTMgbLNmV2lj imvR/F5fX87xl0ZI1SoxqOcpsb2qS4EEPvy/sSD30XyNgh+d5zviPL3k0N/+0QecKVy2u+yWRFoGQ +Yqutk67Fhbrtg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <874jj45hhl.fsf@HIDDEN> (Ulf Herrman's message of "Fri, 06 Oct 2023 02:37:26 -0500") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <87a5swlbnp.fsf@HIDDEN> <874jj45hhl.fsf@HIDDEN> Date: Thu, 12 Oct 2023 15:47:32 +0200 Message-ID: <87h6mwlzpn.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Ulf Herrman <striness@HIDDEN> skribis: > I've also been using this patch, which rebinds `this-package' within > package variants to refer instead to the variant rather than the > original. Could you send it as a separate issue? (I think I once reported a bug for this issue, but I can=E2=80=99t find it.) Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 07:08:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 12 03:08:26 2023 Received: from localhost ([127.0.0.1]:40501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qqpo2-0007Ns-7F for submit <at> debbugs.gnu.org; Thu, 12 Oct 2023 03:08:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qqpny-0007Nc-E3 for 65665 <at> debbugs.gnu.org; Thu, 12 Oct 2023 03:08:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qqpnU-0007RF-ID; Thu, 12 Oct 2023 03:07:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=hdMt+UxpnWIriaJm9PE4GtpOevCynWMqBMyELVWVNk4=; b=oX+Nyjg8cQS8iu68iUHt w/9zBMkmdtY2gGzBUCOTddr8eaUxTmOPW7aNfMQHpkSXZC3i1uPf4MXF+DudLfTo0twv8S2q5SQCB 0Y+FN6g+Xd04mDMA9p4fDTUZwCuUueKCuKBaqJaSOgsNyRihPi8vj+Z928zaeHB5ol6/FI3GE474g VOQHM7u3mJn2IR1aipEcvoWkrez1KuOQOwF2gK4ISXEiANHs7OmG3DdhQegnYGk158Jct62EhUVMV sBadzqqGPBDZ2tnWpPYtubeA2fNFtDFXOE9KcDD5b4LeszTq8WToRdl1w1eATM3zjy+5Fzl007AeI 3u3eAiXdtfO+ZQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: bug#65665: [PATCH] Really get all the implicit inputs. In-Reply-To: <87a5swlbnp.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 05 Oct 2023 22:36:42 -0400") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <87a5swlbnp.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Primidi 21 =?utf-8?Q?Vend=C3=A9miaire?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Chanvre X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 12 Oct 2023 09:07:44 +0200 Message-ID: <87h6mwpbcv.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65665 Cc: dev@HIDDEN, Ulf Herrman <striness@HIDDEN>, zimon.toutoune@HIDDEN, othacehe@HIDDEN, me@HIDDEN, 65665 <at> debbugs.gnu.org, rekado@HIDDEN, guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi! Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: > Ulf Herrman <striness@HIDDEN> writes: > >> This patch series causes package-mapping to recurse into package and bag >> arguments when #:deep? #t is given. It also recurses into gexps and >> gexp inputs in search of packages to devour. It also ensures that build >> systems leave all of their implicit package arguments in the bag >> arguments, ready to be found by package-mapping. It also fixes a couple >> build system errors I came across while modifying 40+ build systems and >> testing a deep package transformation. > > Nice series! > > I've reviewed it, and it makes sense to me. I'd like to apply it to the > core-updates branch. Core team, what say you? Sorry for the delay, I=E2=80=99ll provide feedback within a couple of days. Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 7 Oct 2023 03:47:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 06 23:47:55 2023 Received: from localhost ([127.0.0.1]:53132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qoyIE-0005Cj-OS for submit <at> debbugs.gnu.org; Fri, 06 Oct 2023 23:47:55 -0400 Received: from tilde.club ([2607:5300:204:4340::114]:48596 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qoyIB-0005CR-SY for 65665 <at> debbugs.gnu.org; Fri, 06 Oct 2023 23:47:52 -0400 Received: by tilde.club (Postfix, from userid 5378) id 507DE2202A79C; Sat, 7 Oct 2023 03:47:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 507DE2202A79C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1696650450; bh=j0JtlAPnyKL7qMEJndsfFdz6aU+kyfK9Sx/DHzXPSVE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=OJnrGgxrdsNmegji7Icsv2fFJig22qD1OyEXWXRMnW/biqthMrlMR2g81g9K3IzWE D2RDESwLagOrL6uwtmX7LBYbUFSMLMkYzJJjeml18pqHpmtjniOhxw4nC6XEF8nyaL Uvezm2T6wmnHohQG1a418nAT7KfSTBaprUSqZsSw= From: Ulf Herrman <striness@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: [PATCH] Really get all the implicit inputs. References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <87a5swlbnp.fsf@HIDDEN> <874jj45hhl.fsf@HIDDEN> Date: Fri, 06 Oct 2023 22:47:04 -0500 In-Reply-To: <874jj45hhl.fsf@HIDDEN> (Ulf Herrman's message of "Fri, 06 Oct 2023 02:37:26 -0500") Message-ID: <87zg0v3xhj.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Ulf Herrman <striness@HIDDEN> writes: > Anyway, I've since forgotten exactly what happened and why (I didn't > actually write the commit message until quite some time later), but I > do know that this patch fixed it. > > I might try to rediscover what the problem was later, but thought it > would be good to make you aware of this so as to hopefully consolidate > world rebuilds. I've since done some more checking to recall what the problem actually was, and it indeed manifested as a combination of an icecat and mesa problem: the wrap-program phase of icecat-minimal uses `this-package-input' to get the mesa to point LD_LIBRARY_PATH to. However, it then stuffs the resulting package inside a <file-append> object, which we don't currently recurse through, so it ends up compiling with one mesa and using another at runtime, which somehow causes a segmentation fault. Having looked at it again, I'm not sure that rebinding `this-package' is the best solution - it's certainly not a general solution, since any old package could be shoved into a <file-append> object (or really any declarative file-like object) and thereby be hidden from transformations. My understanding is that packaging guidelines already discourage directly substituting top-level package references, preferring instead tools like `this-package-input' so as to work nicely with transformations. If those guidelines are adhered to, the aforementioned patch should fix issues of this nature. I'm not sure what the best way of handling objects like <file-append> and such is, but as long as package references go through `this-package', it should only matter for implicit inputs, and I don't think any of them use declarative file-like objects other than <package>. After thinking about it some more, I think it would be good if we had a way of testing to make sure that every package is "transformable": that is, if you apply a deep transformation to it, and lower the result to a derivation, at no point within the dynamic extent of that lowering is a derivation from an untransformed package introduced. This would allow for testing for transformability en masse, and could be added to 'guix lint'. - Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUg1LkUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mjWFwwAq+08T2FDh1u+Hb6DHC/7Pexfe4G2 l7geedz0yRFFtbZ8BD593yA+TLGwdsNE05F7D6gLmQdsz3OIHmTEHxk0yaO3SqAI GFRaue5btZ2gmbeQiNy2CLwX8lDGqyjO40IrDNntQ4iG7WqKKp066pWGpVj0jLvR JifEjneB937IJrqo3MwwLiBUGAEMAnBbR3S4p4qGRAIyzBhrW204iXdMaRLgUgXN kbm7hlrOFHi9ixOoc4abO+esywzLya8qyfyFh/0lENuKszszOUGgWUnqfMyxma73 Nzf67nG1fT69X5c+nfUx1vRt5YiZCu5y949S8pFHABUvSqo8/tcK4bYVIu+umcj+ 9lOerIYRshInWPCrxipKnmkt0azBxz7I4PA0tCgfCrrmd7yvWY+sWpd6+kGDoAne drWIeGAsXK8+0bYp4ENyoGlywZw04dZSEAwwplqFfIRMtE5Pk6SwOJsR0pe+Eu7O sU6doFqccPWZkyYSZola9q4uzG5tv/kmYP+m =fgOf -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 6 Oct 2023 07:38:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 06 03:38:12 2023 Received: from localhost ([127.0.0.1]:49072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qofPX-0005dL-FE for submit <at> debbugs.gnu.org; Fri, 06 Oct 2023 03:38:12 -0400 Received: from tilde.club ([2607:5300:204:4340::114]:34588 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qofPS-0005d7-88 for 65665 <at> debbugs.gnu.org; Fri, 06 Oct 2023 03:38:09 -0400 Received: by tilde.club (Postfix, from userid 5378) id 272B2222ACC87; Fri, 6 Oct 2023 07:37:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 272B2222ACC87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1696577865; bh=Mb1IdrgucVJqlsv9RJ7EoHK0y1aCg6nGOIsc+DdQ5z0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CKB14xi3WKauTTa9DdLOkHBiZa6dlpGXf798b1baL+Yi0GvlMZan/OJm2sK82CXvf QDrYvOa0ujgZboGMFQVUnSQWOHCORXy6AW25da9uhkecj4TO13/Tia8NvMbTVlXjdW Uzalph/ssxSZaihwVumEkN2gsFb92pHMmY4+6jZ4= From: Ulf Herrman <striness@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: bug#65665: [PATCH] Really get all the implicit inputs. References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> <87a5swlbnp.fsf@HIDDEN> Date: Fri, 06 Oct 2023 02:37:26 -0500 In-Reply-To: <87a5swlbnp.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 05 Oct 2023 22:36:42 -0400") Message-ID: <874jj45hhl.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain I've also been using this patch, which rebinds `this-package' within package variants to refer instead to the variant rather than the original. When I tried applying a deep transformation to icecat, it failed to reach icecat-minimal or something like that. Or maybe it was some input of icecat - might have been my local version of mesa that had breakage. Anyway, I've since forgotten exactly what happened and why (I didn't actually write the commit message until quite some time later), but I do know that this patch fixed it. I might try to rediscover what the problem was later, but thought it would be good to make you aware of this so as to hopefully consolidate world rebuilds. - Ulf --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-packages-rebind-this-package-for-package-varian.patch Content-Transfer-Encoding: quoted-printable From=2006245c37fc0ee21144279682223dff01f3e6dbf4 Mon Sep 17 00:00:00 2001 Message-Id: <06245c37fc0ee21144279682223dff01f3e6dbf4.1696574074.git.strine= ss@HIDDEN> From: Ulf Herrman <striness@HIDDEN> Date: Wed, 4 Oct 2023 03:17:25 -0500 Subject: [PATCH] guix: packages: rebind `this-package' for package variants. Background: there is a `this-package' identifier that can be used within any of the thunked fields of <package>. This is implemented by passing the package in question as an argument to the "thunk" that is called to get the field value. `this-package' is used to implement macros like `this-package-input'. Consequently, there is a subtle difference between a package that inherits another package's thunked field and one that wraps it: in the former, the `this-package' of the thunked field will refer to the inheriting package, while in the latter case it will refer to the original package. Use of `this-package' tends to cause lots of subtle and hard-to-debug break= age when package transformations are used. In `package-mapping', it makes more sense to have `this-package' refer to the transformed package (that is, the package after being transformed by the user-provided procedure and having a= ll of its applicable inputs transformed, recursively), since otherwise untransformed inputs may be reintroduced via `this-package'. There's still one place where `this-package' can cause problems, though, and that's in the user-specified transformation procedure itself. Whether it's appropriate to have the thunks of the original refer to the original package or the transformed package is only really known by the author of the transformation. We therefore expose procedures for invoking the field thun= ks with arbitrary packages. In my experience, this has led to far more consistent and predictable package-transforming. If we really need the ability to refer to the lexically enclosing package instead of "whichever package ends up using this field definition" - which seems to be unnecessary at present, since the overwhelming majority of uses= of 'this-package' are in the context of 'this-package-input', etc - we could introduce a 'this-literal-package' identifier. Or we could rename all curr= ent uses of 'this-package' to use 'this-package-variant' or something like that, though that sounds like more work. * guix/packages.scm (package-inputs-with-package, package-native-inputs-with-package, package-propagated-inputs-with-packag= e, package-arguments-with-package): new procedures. (package-mapping): use them. =2D-- guix/packages.scm | 61 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 1334def142..288867b911 100644 =2D-- a/guix/packages.scm +++ b/guix/packages.scm @@ -138,6 +138,11 @@ (define-module (guix packages) package-transitive-propagated-inputs package-transitive-native-search-paths package-transitive-supported-systems + package-inputs-with-package + package-native-inputs-with-package + package-propagated-inputs-with-package + package-arguments-with-package + package-mapping package-input-rewriting package-input-rewriting/spec @@ -1451,6 +1456,31 @@ (define (build-system-with-package-mapping bs rewrit= e-input rewrite-argument) (inherit bs) (lower lower*))) =20 +(define (package-inputs-with-package p0 p) + (match p0 + (($ <package> _ _ _ _ args-proc + inputs-proc + propagated-inputs-proc + native-inputs-proc) + (inputs-proc p)))) + +(define (package-native-inputs-with-package p0 p) + (match p0 + (($ <package> _ _ _ _ _ _ _ + native-inputs-proc) + (native-inputs-proc p)))) + +(define (package-propagated-inputs-with-package p0 p) + (match p0 + (($ <package> _ _ _ _ _ _ + propagated-inputs-proc) + (propagated-inputs-proc p)))) + +(define (package-arguments-with-package p0 p) + (match p0 + (($ <package> _ _ _ _ arguments-proc) + (arguments-proc p)))) + (define* (package-mapping proc #:optional (cut? (const #f)) #:key deep?) "Return a procedure that, given a package, applies PROC to all the packa= ges @@ -1525,22 +1555,25 @@ (define* (package-mapping proc #:optional (cut? (co= nst #f)) rewrite-input rewrite-argument) (package-build-system p))) =2D (inputs (map rewrite-input (package-inputs p))) =2D (native-inputs (map rewrite-input (package-native-input= s p))) + (inputs (map rewrite-input + (package-inputs-with-package p this-package)= )) + (native-inputs (map rewrite-input + (package-native-inputs-with-package + p this-package))) (propagated-inputs =2D (map rewrite-input (package-propagated-inputs p))) + (map rewrite-input + (package-propagated-inputs-with-package + p this-package))) (arguments =2D (match p =2D (($ <package> _ _ _ _ args-proc) =2D ;; If we let ARGS-PROC be passed its original pa= ckage, =2D ;; we somehow end up in an infinite (or maybe ju= st =2D ;; exponential? Never seen it end...) loop. Sho= uld =2D ;; probably figure out what's causing that at so= me =2D ;; point. =2D (let ((args (args-proc this-package))) =2D (if deep? =2D (map rewrite-argument args) =2D args))))) + ;; If we let ARGS-PROC be passed its original package, + ;; we somehow end up in an infinite (or maybe just + ;; exponential? Never seen it end...) loop. Should + ;; probably figure out what's causing that at some + ;; point. + (if deep? + (map rewrite-argument (package-arguments-with-package + p this-package)) + (package-arguments-with-package p this-package))) (replacement (and=3D> (package-replacement p) replace)) (properties `((,mapping-property . #t) ,@(package-properties p))))))))) =2D-=20 2.40.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUfuTkUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mhIQwwAgwcoLrdBgZ7EswiivPR1YcVVJtU+ gXErgi4FySkAtERIemOi5OSpwrwgnFPUJiSggW1og75iJjXB7edvq7Evi55wSBqy oqDgUUezKxiRiP885xGdfjF+DEBh6j+TJuzwMU4JXP2AKfar81KQv9LSiLtoG+EW QA6IOxTYOU/onMd18tLr4Fz1vGcVQFcXL9gSvNcFFSb61ovM2OtCj90nbCmYT3E5 HVE4NpNANI5NizHbraAJ35pCEZPQJo+6z4H+juccAxdBoKzVxLtAgKKAxCIJeJZL MUfOQyVT7vFwoDc3NI+Z2LG4tCTLXRk3NUhj8evlM2gl5zCE6TCKoP+rsDlbCCiZ ksMRpdgV7M+/I7RmRQkN1d3PfggKtm9VO3ZxhqiYbSA3RQrYRkkzi0zTFt60nhWC ZUlGYonEDjzLr5ETcg4/uCsW1GqsmrLO8IbM+0+Kys0UM8qlaJbgDrMmmVFoOd3w W04VlnNhjVRM2KA1gn15jFNQNT/8t0veKPD0 =xHJK -----END PGP SIGNATURE----- --==-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 6 Oct 2023 02:37:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 05 22:37:29 2023 Received: from localhost ([127.0.0.1]:48960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qoaiT-0005Qw-F5 for submit <at> debbugs.gnu.org; Thu, 05 Oct 2023 22:37:29 -0400 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]:57824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qoaiD-0005QQ-3Q for 65665 <at> debbugs.gnu.org; Thu, 05 Oct 2023 22:37:24 -0400 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-65b2463d651so9310756d6.3 for <65665 <at> debbugs.gnu.org>; Thu, 05 Oct 2023 19:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696559805; x=1697164605; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=TcmSSFmeNVszjIhS4cSOCke81Z/gjBltYyBoGVF7qC8=; b=B8xaHrZIplA1SJbqQ2EliL7kD21voRjQeMezOkPtXeqIKfoL0AOCPvs+HicnuAi3H0 b04Ljp7pqnO9rvRL+Q+xX7r8U2CHFUui0ZLyL/5g5TjTfc6lCSUu832yeGI4Z0v57bEt 0vK5G5CbDJKs4ipl7SHsGNk7WxlFsqVRhWollWw22k+noAlFeCZ1BhQCd3P51wu/tyiA JpPE9Ncml0LQl2QfMdQqhWueTITiPqBUjU6lFRLd0DotUrQBlnr+VoIY7Nr4WOViq2uR BtnRMKktnk3i0G4xBvvVDR0D3M0R4ME5GIpgfXrlgcMYYcqe5tuOgJ1lAIH/cfMf8YkU HKIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696559805; x=1697164605; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TcmSSFmeNVszjIhS4cSOCke81Z/gjBltYyBoGVF7qC8=; b=h52zNM9VuPQw/PA5SRg4J+ejByKSwdbdiJi5eYsxBLkms76zbU+l/hHuUooww6ZRZL 3LItZ3QJUq5t3XElbYTRS4eTQgXSEFbi3edWdLpOgaPUK2NZ+FH9KxrbAUHYjRFAD7eq 7y5w8QCjckn8kNyAZo9FsqEW1QgU81vpCDMwvmz3FOdafoYu5C1+yXAVzF6qaqH1diDu RkbaNkEMTy4ca/0adH+FJKT3aBYoFzROeQbUjUEfV26txVBgvXHbjxWy+fPfd3M3TBE7 Y7uPIVO6tgy86XLl/2wOmxIzaNmUhy7prBUwoayHNBFxjidOIQBQ5pv+dw95wcxjs62a Y5DA== X-Gm-Message-State: AOJu0YxC8h+KhaTHqF/5kUtxyR3WWJQvOznZ5FM2Xde4ohMYqIS0uUMK eQ0rMCKfaavmVJE4vQvQhhI= X-Google-Smtp-Source: AGHT+IGRLPb93X97yA/u3VA1nEx//9V4A6c3VCbHvSdl9H8K5Xlg9xpNEjGYRy9R1z/QK+uotDAw0w== X-Received: by 2002:a0c:f647:0:b0:658:9896:91b2 with SMTP id s7-20020a0cf647000000b00658989691b2mr6740831qvm.7.1696559804920; Thu, 05 Oct 2023 19:36:44 -0700 (PDT) Received: from hurd (dsl-151-116.b2b2c.ca. [66.158.151.116]) by smtp.gmail.com with ESMTPSA id t10-20020a0ca68a000000b0065afcf19e23sm994377qva.62.2023.10.05.19.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 19:36:44 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: [PATCH] Really get all the implicit inputs. In-Reply-To: <87msxmqwng.fsf@HIDDEN> (Ulf Herrman's message of "Sat, 16 Sep 2023 04:45:23 -0500") References: <87h6ofufy5.fsf@HIDDEN> <87msxmqwng.fsf@HIDDEN> Date: Thu, 05 Oct 2023 22:36:42 -0400 Message-ID: <87a5swlbnp.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: dev@HIDDEN, zimon.toutoune@HIDDEN, othacehe@HIDDEN, ludo@HIDDEN, me@HIDDEN, 65665 <at> debbugs.gnu.org, rekado@HIDDEN, guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello Ulf! Ulf Herrman <striness@HIDDEN> writes: > This patch series causes package-mapping to recurse into package and bag > arguments when #:deep? #t is given. It also recurses into gexps and > gexp inputs in search of packages to devour. It also ensures that build > systems leave all of their implicit package arguments in the bag > arguments, ready to be found by package-mapping. It also fixes a couple > build system errors I came across while modifying 40+ build systems and > testing a deep package transformation. Nice series! I've reviewed it, and it makes sense to me. I'd like to apply it to the core-updates branch. Core team, what say you? -- Thanks, Maxim
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 16 Sep 2023 09:46:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 16 05:46:05 2023 Received: from localhost ([127.0.0.1]:45400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qhRsI-0002pk-Hu for submit <at> debbugs.gnu.org; Sat, 16 Sep 2023 05:46:05 -0400 Received: from tilde.club ([2607:5300:204:4340::114]:35900 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qhRsD-0002pG-P8 for 65665 <at> debbugs.gnu.org; Sat, 16 Sep 2023 05:46:01 -0400 Received: by tilde.club (Postfix, from userid 5378) id 8A9F52230B9B9; Sat, 16 Sep 2023 09:45:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 8A9F52230B9B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1694857548; bh=6YyDUP3P3GM1Ivf42ALyG3EBQT1ZBCEcRHu7f77kYYU=; h=From:To:Subject:Date:From; b=LnuxhW0Apqvm9u3qLlehOuppl50mujkBusuB5kRQBz0oLv+wRXbX/gt5yMNLG4NCZ mdhkkKgGfFfhj/N3NsLe3RotpPJehATZiAwTgdZ/WQ7DrQC6A5uzL6Q1jsXv4x4fz0 fWx0vgQguEUAmw5EU9INH2yH78jCDtZwFDCRWPSs= From: Ulf Herrman <striness@HIDDEN> To: 65665 <at> debbugs.gnu.org Subject: [PATCH] Really get all the implicit inputs. Date: Sat, 16 Sep 2023 04:45:23 -0500 Message-ID: <87msxmqwng.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65665 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain This patch series causes package-mapping to recurse into package and bag arguments when #:deep? #t is given. It also recurses into gexps and gexp inputs in search of packages to devour. It also ensures that build systems leave all of their implicit package arguments in the bag arguments, ready to be found by package-mapping. It also fixes a couple build system errors I came across while modifying 40+ build systems and testing a deep package transformation. - ulfvonbelow --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-packages-rewrite-arguments-with-package-mapping.patch Content-Transfer-Encoding: quoted-printable From=2073b2dfe98591073104fd069622ede2acab0c7655 Mon Sep 17 00:00:00 2001 Message-Id: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@HIDDEN> From: Ulf Herrman <striness@HIDDEN> Date: Fri, 15 Sep 2023 07:38:24 -0500 Subject: [PATCH 1/5] guix: packages: rewrite arguments with `package-mappin= g'. * guix/gexp.scm (make-gexp, gexp-references, gexp-self-modules, gexp-self-extensions, gexp-proc, %gexp-location): export. * guix/packages.scm (build-system-with-package-mapping): replace `rewrite' argument with `rewrite-input' and `rewrite-argument' arguments. Use `rewrite-argument' to rewrite bag arguments. (package-mapping): rewrite package arguments when `deep?' is true. =2D-- guix/gexp.scm | 7 ++++++ guix/packages.scm | 56 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/guix/gexp.scm b/guix/gexp.scm index 0fe4f1c98a..6acd3116d4 100644 =2D-- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -39,6 +39,13 @@ (define-module (guix gexp) #:use-module (ice-9 match) #:export (gexp gexp? + make-gexp + gexp-references + gexp-self-modules + gexp-self-extensions + gexp-proc + %gexp-location + sexp->gexp with-imported-modules with-extensions diff --git a/guix/packages.scm b/guix/packages.scm index ba98bb0fb4..1334def142 100644 =2D-- a/guix/packages.scm +++ b/guix/packages.scm @@ -1431,7 +1431,7 @@ (define* (package-closure packages #:key (system (%cu= rrent-system))) (vhash-consq package #t visited) (fold set-insert closure dependencies)))))))) =20 =2D(define (build-system-with-package-mapping bs rewrite) +(define (build-system-with-package-mapping bs rewrite-input rewrite-argume= nt) "Return a variant of BS, a build system, that rewrites a bag's inputs by passing them through REWRITE, a procedure that takes an input tuplet and returns a \"rewritten\" input tuplet." @@ -1442,9 +1442,10 @@ (define (build-system-with-package-mapping bs rewrit= e) (let ((lowered (apply lower args))) (bag (inherit lowered) =2D (build-inputs (map rewrite (bag-build-inputs lowered))) =2D (host-inputs (map rewrite (bag-host-inputs lowered))) =2D (target-inputs (map rewrite (bag-target-inputs lowered)))))) + (build-inputs (map rewrite-input (bag-build-inputs lowered))) + (host-inputs (map rewrite-input (bag-host-inputs lowered))) + (target-inputs (map rewrite-input (bag-target-inputs lowered))) + (arguments (map rewrite-argument (bag-arguments lowered)))))) =20 (build-system (inherit bs) @@ -1456,13 +1457,32 @@ (define* (package-mapping proc #:optional (cut? (co= nst #f)) depended on and returns the resulting package. The procedure stops recurs= ion when CUT? returns true for a given package. When DEEP? is true, PROC is applied to implicit inputs as well." =2D (define (rewrite input) + (define (rewrite-input input) (match input ((label (? package? package) outputs ...) (cons* label (replace package) outputs)) (_ input))) =20 + (define (rewrite-argument arg) + (match arg + ((? package? p) + (replace p)) + ((? gexp-input? gi) + (gexp-input (rewrite-argument (gexp-input-thing gi)) + (gexp-input-output gi) + #:native? (gexp-input-native? gi))) + ((? gexp? gxp) + (make-gexp (map rewrite-argument (gexp-references gxp)) + (gexp-self-modules gxp) + (gexp-self-extensions gxp) + (gexp-proc gxp) + (%gexp-location gxp))) + ((lst ...) + (map rewrite-argument lst)) + (_ + arg))) + (define mapping-property ;; Property indicating whether the package has already been processed. (gensym " package-mapping-done")) @@ -1484,7 +1504,8 @@ (define* (package-mapping proc #:optional (cut? (cons= t #f)) (inherit p) (location (package-location p)) (replacement (package-replacement p)) =2D (propagated-inputs (map rewrite (package-propagated= -inputs p))) + (propagated-inputs (map rewrite-input + (package-propagated-inputs p)= )) (properties `((,mapping-property . #t) ,@(package-properties p))))))) =20 @@ -1500,11 +1521,26 @@ (define* (package-mapping proc #:optional (cut? (co= nst #f)) (location (package-location p)) (build-system (if deep? (build-system-with-package-mapping =2D (package-build-system p) rewrite) + (package-build-system p) + rewrite-input + rewrite-argument) (package-build-system p))) =2D (inputs (map rewrite (package-inputs p))) =2D (native-inputs (map rewrite (package-native-inputs p))) =2D (propagated-inputs (map rewrite (package-propagated-inp= uts p))) + (inputs (map rewrite-input (package-inputs p))) + (native-inputs (map rewrite-input (package-native-inputs = p))) + (propagated-inputs + (map rewrite-input (package-propagated-inputs p))) + (arguments + (match p + (($ <package> _ _ _ _ args-proc) + ;; If we let ARGS-PROC be passed its original pack= age, + ;; we somehow end up in an infinite (or maybe just + ;; exponential? Never seen it end...) loop. Should + ;; probably figure out what's causing that at some + ;; point. + (let ((args (args-proc this-package))) + (if deep? + (map rewrite-argument args) + args))))) (replacement (and=3D> (package-replacement p) replace)) (properties `((,mapping-property . #t) ,@(package-properties p))))))))) base-commit: bfb480e76f7968f8e39e37e64681b0fd062edb1e prerequisite-patch-id: b512735cd31c9f7564894ed3a5c1c3b921eeaed3 prerequisite-patch-id: d782bad3845786f3ef367822aeb146a1e5e994d7 prerequisite-patch-id: c277154bb5fbcb1e6a2af576d6f7eebde308b010 prerequisite-patch-id: 088174854de84cd796d4fe7f39386b1539a3df51 prerequisite-patch-id: 083848588d3bae9d392fb1270b64990f13209dbe prerequisite-patch-id: 36801b82c0a0365ab18a3a6ad3814e8fbe1b0630 prerequisite-patch-id: de0adff180c2ea6e9d1c34f8f0b1d62ec7863ccf prerequisite-patch-id: 7054626c27a5208550912b11e92bb16dab15fb34 prerequisite-patch-id: 5736a5673877a8185a80d0c9767f288bddc239d3 prerequisite-patch-id: 4e23b3ba151bebb40d56816915f9d0503fe1566b prerequisite-patch-id: 4edcd21bef307dbe07a9605314aaa446f45a943f prerequisite-patch-id: 0a98f8e01ac1df033a86b5f42d01dd9baece0807 prerequisite-patch-id: e55e0c751b9772a31656decb1aec8bcc193685b0 prerequisite-patch-id: 837b6cf8db48bdb22c7573ce0fb63a1a6255640b prerequisite-patch-id: 0c07d4138fc33f6d976b7c7ff2d25b93145dc417 prerequisite-patch-id: 1875c8e646ce329f8a72da90367c3725c953b5c2 prerequisite-patch-id: 8c429132b33f94d9f910413f56e9b3ca18d0db43 prerequisite-patch-id: 121cf7bd1b560e8db138132990840a20c20c6636 prerequisite-patch-id: e9662377bc432936ffbfffaa10dff3a285eacd26 prerequisite-patch-id: cfd757e3df23f22fbd88441ecabfe21f37b4d140 prerequisite-patch-id: a563c6b6f53532a7a6fb7fe8ebbb11d237947b7f prerequisite-patch-id: da271d8023063a789328959f5dc6389675d5d46a prerequisite-patch-id: 271b2952dc050715c90848953e3586b35e21d184 prerequisite-patch-id: 92caaf95030c644dec30fc139a63e25b1dc8d48c prerequisite-patch-id: e03d9290c61f083c96b084403e6dc69394ee2faa prerequisite-patch-id: 3ca7c6fd53e9cd1c07bfb2e16763ecaf6d0cc4eb prerequisite-patch-id: 018b82c741ee4e1370df059b22cc86aa4735644b prerequisite-patch-id: a26834894fcd1380dfd5a979088114d50d0df392 prerequisite-patch-id: 8916b1ce832d695ecb86e4f36b3fe1a5529552dc prerequisite-patch-id: 2230d379e61787c3327f89ef02c8de3ab879090d prerequisite-patch-id: fb4536c142e85bb0a6610203ae25a74f7342351d prerequisite-patch-id: dc0a3e2e36977cf203ad0c74650844758446c115 prerequisite-patch-id: f9e2903e96a7e6e08f9a9ce10e8f35650a2bc9d0 prerequisite-patch-id: 52609b8f7999fe1bfd2ad90aba421042b1e39a50 prerequisite-patch-id: 4b6138782ae74502be87966344f7bb5d88e8734c prerequisite-patch-id: 411c9c605a4e89efe01841517486a3d6015be917 prerequisite-patch-id: e07e206a39a0b173786207d335740f08d0baecb2 prerequisite-patch-id: 424af6d825a003e67545f8f23fc292407a029a4e prerequisite-patch-id: cd9480f3fbb837834ef9294aec9d25e797927456 prerequisite-patch-id: 2f401351ac266c92a77cbcf54549ce5bee78e93e prerequisite-patch-id: aff161c12c59578d3d1e4569ad3bea0ab7fa231d prerequisite-patch-id: 156e04e25c5f214fd5e9ba3a4548b960bf8d5142 prerequisite-patch-id: 61869ccfd561784d16df3d62dae522790b182ea0 prerequisite-patch-id: a19bb63b9c373c4f153545de121024c2f0008e03 prerequisite-patch-id: 92eb3cfcdb4791daed167477aa19d34400455f2b prerequisite-patch-id: 7e00825d11982a64a671116fc30ebe34ff562974 prerequisite-patch-id: a920acf76ea0ed8484888c28f5803def46b496e8 prerequisite-patch-id: a2f4feda897c80d54fefac2979b34dc8755d2562 prerequisite-patch-id: 66bd73e2012a407a0ae8c07ead463bb87ac7ceb1 prerequisite-patch-id: c7703e99c566323d908bfdd31896401c61d9c6e9 prerequisite-patch-id: b05dec5daf49254938536568b1f0e259f85a5f27 prerequisite-patch-id: 2ec62060c8d777a316cb35a5956fca2d6340c238 prerequisite-patch-id: 5e47032571af5476c2a4d9bbbe9c98ac62736acf prerequisite-patch-id: f3f2d80dc4d970ec7e27221b1713303a752602db prerequisite-patch-id: cf272874f837a1089867a3c578ba773b9722e4bc prerequisite-patch-id: 26b133febfaa8e56cacf9695fec9e47ac7752437 prerequisite-patch-id: 2370164c61289dc27dacd1a3fce404b42a5cd306 prerequisite-patch-id: 8e151f495e68d05d7ae3a58b75965ed6ad402cb3 prerequisite-patch-id: 1e1d8a1a5c3d2e7c012c3800b2f162bbfb11830e prerequisite-patch-id: 20b2ba87fb4a1d22b2e5d189868953deb1b8432d prerequisite-patch-id: 4b7a45d0216169dddf32b0556847edcf1fe83c77 prerequisite-patch-id: a7caa886acb871c8fae58942ea33c4830c1bf50a prerequisite-patch-id: 4cb809d1af72bfb4160541432f84e7f7a2ec377c prerequisite-patch-id: b8bba3077b9e27a14b7a4500145a546e2551920b prerequisite-patch-id: 42371e75be346f69a66f1af370f10e19118d3666 prerequisite-patch-id: fbcbda683c60fc49fb0acb35e8fcba3632e33c1d prerequisite-patch-id: 5a7497e62af0532f2262e825ecfffdc87b46a4cd prerequisite-patch-id: 39515c3e9d305eca348d158422e1db32d02a2f6f prerequisite-patch-id: cb139244b5614b18feeb19793713a1836e637e23 prerequisite-patch-id: 095b7088b6d2e2738d07a2c5409f9116640f1e8c prerequisite-patch-id: 36e9e48ae432da7f9e0438ff3bd2476fb4ee17ef prerequisite-patch-id: a0be866c6a75021f6d9ae024a5ebeb94f14ef039 prerequisite-patch-id: 0d424f7822bad63211e0f5f2e8432053fcc2280d prerequisite-patch-id: a59b7626f41bf5570f2119e4b148c7da4370c604 prerequisite-patch-id: 3d4f86e81bda469eb2cac04b6781847f32ba2d4b prerequisite-patch-id: d364cccdb604ed9d3d9b98d821ef1bcba2f93dd4 prerequisite-patch-id: ad4bbb2ffa1a81c85e6f7a3da474648c57abeb08 prerequisite-patch-id: b2ccfb33f49dcee45d0eae151d63c20619eba269 prerequisite-patch-id: 370503f330a01247f61b6f8da90cc1874addca9d prerequisite-patch-id: bf97596682da5aa565d63e58806e64c57501bfbf prerequisite-patch-id: ff1ce6c53974f6458a24f5d68d656514a49b496a prerequisite-patch-id: abec97caff0781ddf8bac457259e336956d31f56 prerequisite-patch-id: 10b5231fdd5214c7ce994d13e9bc4accd9c3e98b prerequisite-patch-id: 6c3ff15435a372b3c176d0ec839507093e7f75d5 prerequisite-patch-id: d874c3ae8cc9643fe65c0def0ab9f62a30ef265e prerequisite-patch-id: 301b58dab98c976159b086b6d9b215f6cfc32560 prerequisite-patch-id: d946ee345019733d07c28073643c11d6a0265887 prerequisite-patch-id: eb86ebc23516ee5a1c69fad149fbf5a82fbf44e2 prerequisite-patch-id: f3aae14f0dc6bd6c07b5405db4efb8677eb109db prerequisite-patch-id: a596041f0af7a7fb2ff8fc39e61c75d1add0b21a prerequisite-patch-id: 6dc272118cfeb1aea0819a796beace8fa8305be7 prerequisite-patch-id: 8dea513488503b59c1971a20b6e5af36fab30f16 prerequisite-patch-id: 489930e028059725a437833f8144cba5b5f88275 prerequisite-patch-id: 101a681e226bba3d782559f9966ed75f6cfac4d0 prerequisite-patch-id: 02d84b8de56dcf379619cb73975e08541258a744 prerequisite-patch-id: 22eb2f65315c0eec851686f01a43772184be67c2 prerequisite-patch-id: f4013eaef497b4e39d5680ae87c388f5e90d962c prerequisite-patch-id: e774f3f01024e9b0522c62d7f0e2e745d1eec9d6 prerequisite-patch-id: 6fea198a4035448351e7ab3c859f5ba7a9974e3e prerequisite-patch-id: 9f9ee707bc7da130f29d23398775b7648345fddd prerequisite-patch-id: fef59953278e9b5c86db36ff047117203aac756c prerequisite-patch-id: 076981cbfd6fdf83498b0abbfab4aa41b17bf32f prerequisite-patch-id: 63746b98da1e924ec78b707e0cab29e1913793e6 prerequisite-patch-id: 4c8b859607b829c54ea2bc94d8fd1807054e347f prerequisite-patch-id: ca54f1fae5954706f3f4b46427b39f3096193e20 prerequisite-patch-id: 8d1176310f67c10d84f7d409152c45584637a5e1 prerequisite-patch-id: d973cfefc6c2621052370ef917c5a30b4b4c6153 prerequisite-patch-id: a16615ac67d4cfb2d7f991d41d7b88e536b8d1e6 prerequisite-patch-id: c99f1ac1c8f31966ab5eace82966b38d7683c7b6 prerequisite-patch-id: ea8cbbe7d266c8e01f92cf47c67a2b77ba2e2f2a prerequisite-patch-id: 87f853bef8078737d6ee37152f9540dc318577b8 prerequisite-patch-id: 624ebedc4b5efd852396af22dfee278e81e18607 prerequisite-patch-id: b0386c11c46382a027d6feb7f8cee077fd1ce7f0 prerequisite-patch-id: f30932e3c494a7e2e758c71a15600f7d02e5fe3c prerequisite-patch-id: c6e5542e49b9e990abfd941b82e6c8f47cce82eb prerequisite-patch-id: 8ed51ac5bb592e2b9a3726d009b390eaf3d02a22 prerequisite-patch-id: 3eb38c477f4039d6dad8ea7657461d5b69582cea prerequisite-patch-id: 604ec349a2100c97da1a9e86443e5fe670fc9aff prerequisite-patch-id: 0ec9b5ad92a820364e736176265cbf38a6aa9865 prerequisite-patch-id: 9f9f6f4f5e6f3f38d57c8fc51dd6d1d1b13614aa prerequisite-patch-id: 3084be13b8e6449d0739a66199d78fd83b273dc9 prerequisite-patch-id: 38129e693708c4068b779fe561befa0789da4e68 prerequisite-patch-id: e599d0af678fca48957ba931713ba46acf57cd26 prerequisite-patch-id: 82676aa787f2d5896dbcc966014c85933ee203bd prerequisite-patch-id: 4e1a39929ca7eb97be4a265ab2961ebb00ac2494 prerequisite-patch-id: 928b20a27997c43597c625e6e431e9963b8a6cdc prerequisite-patch-id: eea41f1a51b1062b9f7fe17ba9b0827bce4f7f8d prerequisite-patch-id: 94d48d21b6e420f0d9bf99d9488136b667d047b4 prerequisite-patch-id: c06f0d333b33836de8800323e814d6dcf214fd78 prerequisite-patch-id: 44515b47a0e5f194b1e782bbbdf4597418c46f77 prerequisite-patch-id: 94eeb31189a81ccbf18dda42a72db715bec3a279 prerequisite-patch-id: d02e7863404940800b63dca3f328547df5cac24f prerequisite-patch-id: c47b08cb4e7ab0a024a2be4b250c4b60ab0bab65 prerequisite-patch-id: fb2396bde2637b96c4412df6ef6a09e9c38e3365 prerequisite-patch-id: 7068eef2aa4f77ef304869b3661c25238f7497e5 prerequisite-patch-id: a2f06d63b11dce495cddad29f5f507a380ff23c2 prerequisite-patch-id: b21a55b8bf2bd23485e0d7d6433ec1f29acd6226 prerequisite-patch-id: 7fd6c9378b4c96bbc7e109f759fd4e7ff6bacba2 prerequisite-patch-id: b109590bb6082361a59547bf252f576a574b75e8 prerequisite-patch-id: f5aa2b7352ffec54c23277d9d4715bbd95c1eb79 prerequisite-patch-id: 2a9907079587beb938680221ededa8f5e0e7d4b2 prerequisite-patch-id: 90f4e54d0b451db6166dbd1d2067e07696e092bf prerequisite-patch-id: 999ec11aaddd785d065911dcb1fc7385ccf053d6 prerequisite-patch-id: cc250a0b2267760feea1427573482db1bb8328e6 prerequisite-patch-id: b593f9fd55bbd9e855baba4b1037d844d5773916 prerequisite-patch-id: 74e3c356cee5e56d4dc3f5bc4f5705cd2ce75a1d prerequisite-patch-id: 7443872a7242e134d8f95398c53f47d4ae21a23b prerequisite-patch-id: da89093d1a5bb1dd8bb6436f4daf70eb4025eae9 prerequisite-patch-id: 3be9735669c6510ef29e75588bbf907d57733834 prerequisite-patch-id: 976e476ba476fe3cd730ac29c825fad81c6331d1 prerequisite-patch-id: 889a29b57cea9cb18f4f4a9c22b04d151b216e1d prerequisite-patch-id: 6b6690e68606f4359e22656a7c6aeae5c58ea017 prerequisite-patch-id: c46954eddc80453f6d7c045fa22ec99a694d9693 prerequisite-patch-id: bdccc141b570181273512c2089d95e4ebcdae453 prerequisite-patch-id: ee3338d64821748f9a7d8ed9cf5e9181c2027252 prerequisite-patch-id: 7f7da1ba32e01163b013d5c4ac96aa468f6e908e prerequisite-patch-id: 83a09cce225aaaa626b3f5d2f3a092055f61a909 prerequisite-patch-id: 7f31991b2e91782e9dd1c1a6fda5f055fdff3234 prerequisite-patch-id: 831310b4d4842a08ad12fdf5c07ce55b57db049d prerequisite-patch-id: 9588d67009d034f36ceef115b158556b8cacb680 prerequisite-patch-id: e0807504b7c5f14f0af8bdbbdd800754888dd8f8 prerequisite-patch-id: 6e3d6e24505bd188d776720913c18c4b874c896c prerequisite-patch-id: e20a2cd4b5a85889b97a5733863175fb56420d01 =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-build-system-asdf-use-substitute-keyword-arguments-w.patch Content-Transfer-Encoding: quoted-printable From=20dcd9b6505fa46d139d40141cf29d7eef15c46481 Mon Sep 17 00:00:00 2001 Message-Id: <dcd9b6505fa46d139d40141cf29d7eef15c46481.1694806866.git.strine= ss@HIDDEN> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@HIDDEN> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@HIDDEN> From: Ulf Herrman <striness@HIDDEN> Date: Fri, 15 Sep 2023 07:48:48 -0500 Subject: [PATCH 2/5] build-system: asdf: use substitute-keyword-arguments w= ith default. A two-argument substitute-keyword-arguments clause won't be evaluated when there isn't already a keyword in the argument list. Using a three-argument clause allows the phases-transformer to be run in all cases. * guix/build-system/asdf.scm (package-with-build-system): use %standard-pha= ses as default value of `phases', use gexps. =2D-- guix/build-system/asdf.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index 2b17cee37b..cd041eed4f 100644 =2D-- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -218,7 +218,8 @@ (define* (package-with-build-system from-build-system t= o-build-system (build-system to-build-system) (arguments (substitute-keyword-arguments base-arguments =2D ((#:phases phases) (list phases-transformer phases)))) + ((#:phases phases #~%standard-phases) + #~(#$phases-transformer #$phases)))) (inputs (new-inputs package-inputs)) (propagated-inputs (new-propagated-inputs)) (native-inputs (append (if target-is-source? =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-build-system-include-all-argument-packages-in-bag-ar.patch Content-Transfer-Encoding: quoted-printable From=204b42f9501284ad66d4de04f5b94bdaf412008d5d Mon Sep 17 00:00:00 2001 Message-Id: <4b42f9501284ad66d4de04f5b94bdaf412008d5d.1694806866.git.strine= ss@HIDDEN> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@HIDDEN> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@HIDDEN> From: Ulf Herrman <striness@HIDDEN> Date: Fri, 15 Sep 2023 08:31:58 -0500 Subject: [PATCH 3/5] build-system: include all argument packages in bag args explicitly. Deep package transformations currently miss several implicit input packages because they are introduced via the bag->derivation builder procedure. This is the case with, for example, qtbase in qt-build-system. This can be avoi= ded by ensuring that those arguments are always explicitly specified in the bag arguments list. Notably, this is also the case for the guile used by the generated build script, so every single build system that uses gexp->derivation needs to be modified. * guix/build-system/agda.scm (lower): include guile in bag arguments. * guix/build-system/android-ndk.scm (lower): include guile in bag arguments. * guix/build-system/ant.scm (lower): include guile in bag arguments. * guix/build-system/asdf.scm (lower, lower/source): include guile in bag arguments. * guix/build-system/cargo.scm (lower): include guile in bag arguments. * guix/build-system/chicken.scm (lower): include guile in bag arguments. * guix/build-system/clojure.scm (lower): include guile in bag arguments. * guix/build-system/cmake.scm (lower): include guile in bag arguments. * guix/build-system/copy.scm (lower): include guile in bag arguments. * guix/build-system/dub.scm (lower): include guile in bag arguments. * guix/build-system/dune.scm (lower): include guile in bag arguments. * guix/build-system/elm.scm (lower): include guile in bag arguments. * guix/build-system/emacs.scm (lower): include guile in bag arguments. * guix/build-system/font.scm (lower): include guile in bag arguments. * guix/build-system/glib-or-gtk.scm (lower): include guile in bag arguments. * guix/build-system/gnu.scm (lower): include guile in bag arguments. * guix/build-system/go.scm (lower): include guile in bag arguments. * guix/build-system/guile.scm (lower): include guile in bag arguments. * guix/build-system/haskell.scm (lower): include guile in bag arguments. * guix/build-system/julia.scm (lower): include guile in bag arguments. * guix/build-system/linux-module.scm (lower): include guile in bag argument= s. * guix/build-system/maven.scm (lower): include guile in bag arguments. * guix/build-system/meson.scm (lower): include guile in bag arguments. * guix/build-system/minify.scm (lower): include guile in bag arguments. * guix/build-system/node.scm (lower): include guile in bag arguments. * guix/build-system/ocaml.scm (lower): include guile in bag arguments. * guix/build-system/perl.scm (lower): include guile in bag arguments. * guix/build-system/pyproject.scm (lower): include guile in bag arguments. * guix/build-system/python.scm (lower): include guile in bag arguments. * guix/build-system/qt.scm (lower): include guile and qtbase in bag arguments. * guix/build-system/r.scm (lower): include guile in bag arguments. * guix/build-system/rakudo.scm (lower): include guile in bag arguments. * guix/build-system/rebar.scm (lower): include guile in bag arguments. * guix/build-system/renpy.scm (lower): include guile in bag arguments. * guix/build-system/ruby.scm (lower): include guile in bag arguments. * guix/build-system/scons.scm (lower): include guile in bag arguments. * guix/build-system/texlive.scm (lower): include guile in bag arguments. * guix/build-system/tree-sitter.scm (lower): include guile in bag arguments. * guix/build-system/trivial.scm (lower): include guile in bag arguments. =2D-- guix/build-system/agda.scm | 6 +++++- guix/build-system/android-ndk.scm | 6 +++++- guix/build-system/ant.scm | 6 +++++- guix/build-system/asdf.scm | 12 ++++++++++-- guix/build-system/cargo.scm | 6 +++++- guix/build-system/chicken.scm | 6 +++++- guix/build-system/clojure.scm | 7 +++++-- guix/build-system/cmake.scm | 6 +++++- guix/build-system/copy.scm | 6 +++++- guix/build-system/dub.scm | 6 +++++- guix/build-system/dune.scm | 5 ++++- guix/build-system/elm.scm | 6 +++++- guix/build-system/emacs.scm | 6 +++++- guix/build-system/font.scm | 6 +++++- guix/build-system/glib-or-gtk.scm | 6 +++++- guix/build-system/gnu.scm | 6 +++++- guix/build-system/go.scm | 6 +++++- guix/build-system/guile.scm | 5 ++++- guix/build-system/haskell.scm | 4 +++- guix/build-system/julia.scm | 6 +++++- guix/build-system/linux-module.scm | 6 +++++- guix/build-system/maven.scm | 6 +++++- guix/build-system/meson.scm | 6 +++++- guix/build-system/minify.scm | 6 +++++- guix/build-system/node.scm | 6 +++++- guix/build-system/ocaml.scm | 6 +++++- guix/build-system/perl.scm | 6 +++++- guix/build-system/pyproject.scm | 6 +++++- guix/build-system/python.scm | 6 +++++- guix/build-system/qt.scm | 7 ++++++- guix/build-system/r.scm | 6 +++++- guix/build-system/rakudo.scm | 6 +++++- guix/build-system/rebar.scm | 6 +++++- guix/build-system/renpy.scm | 6 +++++- guix/build-system/ruby.scm | 6 +++++- guix/build-system/scons.scm | 6 +++++- guix/build-system/texlive.scm | 6 +++++- guix/build-system/tree-sitter.scm | 6 +++++- guix/build-system/trivial.scm | 3 ++- guix/build-system/waf.scm | 6 +++++- 40 files changed, 199 insertions(+), 42 deletions(-) diff --git a/guix/build-system/agda.scm b/guix/build-system/agda.scm index 64983dff60..511f1f11b5 100644 =2D-- a/guix/build-system/agda.scm +++ b/guix/build-system/agda.scm @@ -47,6 +47,7 @@ (define %default-modules (define* (lower name #:key source inputs native-inputs outputs system target (agda (default-agda)) + (guile (default-guile)) gnu-and-haskell? #:allow-other-keys #:rest arguments) @@ -73,7 +74,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build agda-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (agda-build name inputs #:key diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-= ndk.scm index 047f884b19..064aacceaa 100644 =2D-- a/guix/build-system/android-ndk.scm +++ b/guix/build-system/android-ndk.scm @@ -82,6 +82,7 @@ (define* (android-ndk-build name inputs =20 (define* (lower name #:key source inputs native-inputs outputs system target + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -106,7 +107,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build android-ndk-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define android-ndk-build-system (build-system diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm index cfb033f6a5..d4998b26e1 100644 =2D-- a/guix/build-system/ant.scm +++ b/guix/build-system/ant.scm @@ -69,6 +69,7 @@ (define* (lower name (jdk (default-jdk)) (ant (default-ant)) (zip (default-zip)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -92,7 +93,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build ant-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (ant-build name inputs #:key diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index cd041eed4f..1adbe7d996 100644 =2D-- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -73,6 +73,7 @@ (define (default-lisp implementation) =20 (define* (lower/source name #:key source inputs outputs native-inputs system ta= rget + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME" @@ -91,7 +92,10 @@ (define* (lower/source name (build-inputs native-inputs) (outputs outputs) (build asdf-build/source) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (asdf-build/source name inputs #:key source outputs @@ -245,6 +249,7 @@ (define (lower lisp-type) (lambda* (name #:key source inputs outputs native-inputs system target (lisp (default-lisp (string->symbol lisp-type))) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME" @@ -264,7 +269,10 @@ (define (lower lisp-type) ,@native-inputs)) (outputs outputs) (build (asdf-build lisp-type)) =2D (arguments (strip-keyword-arguments private-keywords argument= s)))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))))) =20 (define (asdf-build lisp-type) (lambda* (name inputs diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 912400a191..84efea019e 100644 =2D-- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -238,6 +238,7 @@ (define* (lower name (rust (default-rust)) (cargo-inputs '()) (cargo-development-inputs '()) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -264,7 +265,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build cargo-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define cargo-build-system (build-system diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..ac1c5804ac 100644 =2D-- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -53,6 +53,7 @@ (define (default-chicken) (define* (lower name #:key source inputs native-inputs outputs system target (chicken (default-chicken)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -77,7 +78,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build chicken-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (chicken-build name inputs #:key diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm index fb897356bc..921edab912 100644 =2D-- a/guix/build-system/clojure.scm +++ b/guix/build-system/clojure.scm @@ -75,6 +75,7 @@ (define* (lower name (clojure (force %default-clojure)) (jdk (force %default-jdk)) (zip (force %default-zip)) + (guile (default-guile)) outputs system #:allow-other-keys #:rest arguments) @@ -98,8 +99,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build clojure-build) =2D (arguments (strip-keyword-arguments private-keywords =2D arguments)))))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))))) =20 (define* (clojure-build name inputs #:key diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index aa187c9844..8db841992c 100644 =2D-- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -57,6 +57,7 @@ (define (default-cmake target) (define* (lower name #:key source inputs native-inputs outputs system target (cmake (default-cmake target)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -93,7 +94,10 @@ (define* (lower name '())) (outputs outputs) (build (if target cmake-cross-build cmake-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (cmake-build name inputs #:key guile source diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm index d58931b33c..2507d77bcc 100644 =2D-- a/guix/build-system/copy.scm +++ b/guix/build-system/copy.scm @@ -57,6 +57,7 @@ (define (default-glibc) (define* (lower name #:key source inputs native-inputs outputs system target (glibc (default-glibc)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -75,7 +76,10 @@ (define* (lower name (build-inputs native-inputs) (outputs outputs) (build copy-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (copy-build name inputs #:key diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm index b4011cdb83..1b9f21b052 100644 =2D-- a/guix/build-system/dub.scm +++ b/guix/build-system/dub.scm @@ -106,6 +106,7 @@ (define* (lower name (dub (default-dub)) (pkg-config (default-pkg-config)) (ld-gold-wrapper (default-ld-gold-wrapper)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -131,7 +132,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build dub-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define dub-build-system (build-system diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index c45f308349..bad523b9eb 100644 =2D-- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -57,6 +57,7 @@ (define* (lower name (dune (default-dune)) (ocaml (ocaml:default-ocaml)) (findlib (ocaml:default-findlib)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -92,7 +93,9 @@ (define* (lower name (build dune-build) (arguments (append `(#:dune-release-flags ,dune-release-flags) =2D (strip-keyword-arguments private-keywords argumen= ts))))))) + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords argum= ents) + ((#:guile _ #t) guile)))))))) =20 (define* (dune-build name inputs #:key diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm index f5321f811b..1c2b4a003e 100644 =2D-- a/guix/build-system/elm.scm +++ b/guix/build-system/elm.scm @@ -119,6 +119,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (implicit-elm-package-inputs? #t) (elm (default-elm)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -165,7 +166,10 @@ (define* (lower name ,@(standard-packages))) (outputs outputs) (build elm-build) =2D (arguments (strip-keyword-arguments private-keywords arguments))))= )) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))))) =20 (define* (elm-build name inputs #:key diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm index ebf97a5344..4ab2883769 100644 =2D-- a/guix/build-system/emacs.scm +++ b/guix/build-system/emacs.scm @@ -57,6 +57,7 @@ (define (default-emacs) (define* (lower name #:key source inputs native-inputs outputs system target (emacs (default-emacs)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -78,7 +79,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build emacs-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (emacs-build name inputs #:key source diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm index c57c304f52..018b5c69dd 100644 =2D-- a/guix/build-system/font.scm +++ b/guix/build-system/font.scm @@ -44,6 +44,7 @@ (define %font-build-system-modules =20 (define* (lower name #:key source inputs native-inputs outputs system target + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -69,7 +70,10 @@ (define* (lower name ("xz" xz)))))) (outputs outputs) (build font-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (font-build name inputs #:key source diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-= gtk.scm index 726d19efad..f8d5a0fa24 100644 =2D-- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -87,6 +87,7 @@ (define* (lower name (implicit-inputs? #t) (implicit-cross-inputs? #t) (strip-binaries? #t) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -120,7 +121,10 @@ (define* (lower name '())) (outputs outputs) (build (if target glib-or-gtk-cross-build glib-or-gtk-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (glib-or-gtk-build name inputs #:key guile source diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index c1aa187c42..7945efa1c3 100644 =2D-- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -278,6 +278,7 @@ (define* (lower name #:key source inputs native-inputs outputs target (implicit-inputs? #t) (implicit-cross-inputs? #t) (strip-binaries? #t) system + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -319,7 +320,10 @@ (define* (lower name outputs (delete "debug" outputs))) (build (if target gnu-cross-build gnu-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define %license-file-regexp ;; Regexp matching license files. diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 0a9761aac7..e27633b624 100644 =2D-- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -120,6 +120,7 @@ (define (make-go-std) (define* (lower name #:key source inputs native-inputs outputs system target (go (default-go)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -164,7 +165,10 @@ (define* (lower name =20 (outputs outputs) (build (if target go-cross-build go-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (go-build name inputs #:key diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm index 1bd292e267..49d8cc77a7 100644 =2D-- a/guix/build-system/guile.scm +++ b/guix/build-system/guile.scm @@ -68,7 +68,10 @@ (define* (lower name '()))) (outputs outputs) (build (if target guile-cross-build guile-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) (default-guile)))))) =20 (define %compile-flags ;; Flags passed to 'guild compile' by default. We choose a common diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm index f8568e33db..b860550998 100644 =2D-- a/guix/build-system/haskell.scm +++ b/guix/build-system/haskell.scm @@ -77,6 +77,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (haskell (default-haskell)) cabal-revision + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -122,7 +123,8 @@ (define* (lower name (match (package-transitive-propagated-inputs p= kg) (((propagated-names . _) ...) (cons name propagated-names)))))) =2D extra-directories)))))))) + extra-directories))) + ((#:guile _ #t) guile)))))) =20 (define* (haskell-build name inputs #:key source diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm index b5521e38e4..b4fc7f6576 100644 =2D-- a/guix/build-system/julia.scm +++ b/guix/build-system/julia.scm @@ -53,6 +53,7 @@ (define (default-julia) (define* (lower name #:key source inputs native-inputs outputs system target (julia (default-julia)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -74,7 +75,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build julia-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (julia-build name inputs #:key source diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-m= odule.scm index e46195b53c..d286ea9cee 100644 =2D-- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -112,6 +112,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (linux (default-linux)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -148,7 +149,10 @@ (define* (lower name '())) (outputs outputs) (build (if target linux-module-build-cross linux-module-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (linux-module-build name inputs #:key diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm index 4bbeaed6a4..b7734a1a07 100644 =2D-- a/guix/build-system/maven.scm +++ b/guix/build-system/maven.scm @@ -116,6 +116,7 @@ (define* (lower name (maven-plugins (default-maven-plugins)) (local-packages '()) (exclude %default-exclude) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -139,7 +140,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build maven-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (maven-build name inputs #:key diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 7c617bffb0..13e2e87b58 100644 =2D-- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -125,6 +125,7 @@ (define* (lower name (meson (default-meson)) (ninja (default-ninja)) (glib-or-gtk? #f) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -156,7 +157,10 @@ (define* (lower name '())) (outputs outputs) (build (if target meson-cross-build meson-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (meson-build name inputs #:key diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm index 787235deeb..384748908c 100644 =2D-- a/guix/build-system/minify.scm +++ b/guix/build-system/minify.scm @@ -50,6 +50,7 @@ (define (default-uglify-js) (define* (lower name #:key source inputs native-inputs outputs system (uglify-js (default-uglify-js)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -68,7 +69,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build minify-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (minify-build name inputs #:key diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index 3f73390809..0b1c1f1ddd 100644 =2D-- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -48,6 +48,7 @@ (define (default-node) (define* (lower name #:key source inputs native-inputs outputs system target (node (default-node)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -74,7 +75,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build node-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (node-build name inputs #:key diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 582d00b4cd..91dda0c391 100644 =2D-- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -229,6 +229,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (ocaml (default-ocaml)) (findlib (default-findlib)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -251,7 +252,10 @@ (define* (lower name ,@(standard-packages))) (outputs outputs) (build ocaml-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (ocaml-build name inputs #:key diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index 7c6deb34bf..99e952a531 100644 =2D-- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -58,6 +58,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (perl (default-perl)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -99,7 +100,10 @@ (define* (lower name (build (if target perl-cross-build perl-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (perl-build name inputs #:key source diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.= scm index 2a2c3af3f3..41b4d2c23f 100644 =2D-- a/guix/build-system/pyproject.scm +++ b/guix/build-system/pyproject.scm @@ -60,6 +60,7 @@ (define sanity-check.py (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -82,7 +83,10 @@ (define* (lower name ,@native-inputs)) (outputs (append outputs '(wheel))) (build pyproject-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (pyproject-build name inputs #:key source diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index cca009fb28..f8657662af 100644 =2D-- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -142,6 +142,7 @@ (define (strip-python2-variant p) (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -164,7 +165,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build python-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (python-build name inputs #:key source diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index 978aed0fc1..97f870a698 100644 =2D-- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -80,6 +80,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (cmake (default-cmake)) (qtbase (default-qtbase)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -116,7 +117,11 @@ (define* (lower name '())) (outputs outputs) (build (if target qt-cross-build qt-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:qtbase _ #t) qtbase) + ((#:guile _ #t) guile))))) =20 =20 (define* (qt-build name inputs diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm index 657346bea3..ed70d7b758 100644 =2D-- a/guix/build-system/r.scm +++ b/guix/build-system/r.scm @@ -79,6 +79,7 @@ (define (default-r) (define* (lower name #:key source inputs native-inputs outputs system target (r (default-r)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -100,7 +101,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build r-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (r-build name inputs #:key diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm index 3b30fdfd0e..654b0c362b 100644 =2D-- a/guix/build-system/rakudo.scm +++ b/guix/build-system/rakudo.scm @@ -68,6 +68,7 @@ (define* (lower name (zef (default-zef)) (with-prove6? #t) (with-zef? #t) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -95,7 +96,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build rakudo-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (rakudo-build name inputs #:key diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm index de1294ec3f..e89f82b768 100644 =2D-- a/guix/build-system/rebar.scm +++ b/guix/build-system/rebar.scm @@ -74,6 +74,7 @@ (define* (lower name #:key source inputs native-inputs outputs system target (rebar (default-rebar3)) (erlang (default-erlang)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -95,7 +96,10 @@ (define* (lower name ,@(standard-packages))) (outputs outputs) (build rebar-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (rebar-build name inputs #:key diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm index 3039e3c63b..75d546fedc 100644 =2D-- a/guix/build-system/renpy.scm +++ b/guix/build-system/renpy.scm @@ -49,6 +49,7 @@ (define %renpy-build-system-modules (define* (lower name #:key source inputs native-inputs outputs system target (renpy (default-renpy)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -70,7 +71,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build renpy-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (renpy-build name inputs #:key diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index a3793a9381..be8df2a93c 100644 =2D-- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -50,6 +50,7 @@ (define (default-ruby) (define* (lower name #:key source inputs native-inputs outputs system target (ruby (default-ruby)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -71,7 +72,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build ruby-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (ruby-build name inputs #:key source diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 046ddef740..95c75c817f 100644 =2D-- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -50,6 +50,7 @@ (define (default-scons) (define* (lower name #:key source inputs native-inputs outputs system target (scons (default-scons)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -71,7 +72,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build scons-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (scons-build name inputs #:key diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm index 88372faa58..941fa37b5f 100644 =2D-- a/guix/build-system/texlive.scm +++ b/guix/build-system/texlive.scm @@ -98,6 +98,7 @@ (define* (lower name system target (texlive-latex-bin? #true) (texlive-bin (default-texlive-bin)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -122,7 +123,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build texlive-build) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (texlive-build name inputs #:key diff --git a/guix/build-system/tree-sitter.scm b/guix/build-system/tree-sit= ter.scm index 21c4eb35b2..1ea0c58817 100644 =2D-- a/guix/build-system/tree-sitter.scm +++ b/guix/build-system/tree-sitter.scm @@ -38,6 +38,7 @@ (define %tree-sitter-build-system-modules =20 (define* (lower name #:key source inputs native-inputs outputs system target + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME from the given arguments." @@ -87,7 +88,10 @@ (define* (lower name (("out") (cons "js" outputs)) (_ outputs))) (build (if target tree-sitter-cross-build tree-sitter-build)) =2D (arguments (strip-keyword-arguments private-keywords arguments)))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile))))) =20 (define* (tree-sitter-build name inputs #:key diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm index e08884baf1..37798cbf7a 100644 =2D-- a/guix/build-system/trivial.scm +++ b/guix/build-system/trivial.scm @@ -26,7 +26,8 @@ (define-module (guix build-system trivial) =20 (define* (lower name #:key source inputs native-inputs outputs system target =2D guile builder (modules '()) allowed-references) + (guile (default-guile)) builder (modules '()) + allowed-references) "Return a bag for NAME." (bag (name name) diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm index 91b3d0d100..abb87156c7 100644 =2D-- a/guix/build-system/waf.scm +++ b/guix/build-system/waf.scm @@ -47,6 +47,7 @@ (define %waf-build-system-modules (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) + (guile (default-guile)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -68,7 +69,10 @@ (define* (lower name ,@native-inputs)) (outputs outputs) (build waf-build) ; only change compared to 'lower' in python.scm =2D (arguments (strip-keyword-arguments private-keywords arguments)= )))) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments private-keywords arguments) + ((#:guile _ #t) guile)))))) =20 (define* (waf-build name inputs #:key source =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-build-system-cargo-dune-ocaml-scons-use-drv-guile-fo.patch Content-Transfer-Encoding: quoted-printable From=209ec825fd06f32757f45f31880e7b238bba769884 Mon Sep 17 00:00:00 2001 Message-Id: <9ec825fd06f32757f45f31880e7b238bba769884.1694806866.git.strine= ss@HIDDEN> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@HIDDEN> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@HIDDEN> From: Ulf Herrman <striness@HIDDEN> Date: Fri, 15 Sep 2023 08:45:39 -0500 Subject: [PATCH 4/5] build-system: {cargo,dune,ocaml,scons}: use drv guile-for-build. These all pass a guile *package* to gexp->derivation in their bag->derivati= on builders, but it wants a derivation. * guix/build-system/cargo.scm (cargo-build): use package->derivation to get guile for build. * guix/build-system/dune.scm (dune-build): same. * guix/build-system/ocaml.scm (ocaml-build): same. * guix/build-system/scons.scm (scons-build): same. =2D-- guix/build-system/cargo.scm | 12 +++++++----- guix/build-system/dune.scm | 14 ++++++++------ guix/build-system/ocaml.scm | 13 ++++++++----- guix/build-system/scons.scm | 13 ++++++++----- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 84efea019e..30d6d2ead9 100644 =2D-- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -120,11 +120,13 @@ (define* (cargo-build name inputs (map search-path-specification->= sexp search-paths)))))) =20 =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define (package-cargo-inputs p) (apply diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index bad523b9eb..1bf93361aa 100644 =2D-- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -21,6 +21,7 @@ =20 (define-module (guix build-system dune) #:use-module (guix store) + #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (guix search-paths) @@ -154,12 +155,13 @@ (define* (dune-build name inputs #:strip-binaries? #$strip-binaries? #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) =2D =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define dune-build-system (build-system diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 91dda0c391..20327295f9 100644 =2D-- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -21,6 +21,7 @@ (define-module (guix build-system ocaml) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix gexp) + #:use-module (guix monads) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) @@ -309,11 +310,13 @@ (define* (ocaml-build name inputs #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) =20 =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define ocaml-build-system (build-system diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 95c75c817f..e504db90c2 100644 =2D-- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -22,6 +22,7 @@ (define-module (guix build-system scons) #:use-module (guix packages) #:use-module (guix monads) #:use-module (guix gexp) + #:use-module (guix store) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) @@ -121,11 +122,13 @@ (define* (scons-build name inputs (map search-path-specification->sexp search-paths))))))) =20 =2D (gexp->derivation name builder =2D #:system system =2D #:target #f =2D #:graft? #f =2D #:guile-for-build guile)) + (mlet %store-monad ((guile (package->derivation (or guile (default-guile= )) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target #f + #:graft? #f + #:guile-for-build guile))) =20 (define scons-build-system (build-system =2D-=20 2.40.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-build-system-dub-add-ld-gold-wrapper-to-private-keyw.patch Content-Transfer-Encoding: quoted-printable From=2032a455ab2852c6ff015a2126953075c67a3371b9 Mon Sep 17 00:00:00 2001 Message-Id: <32a455ab2852c6ff015a2126953075c67a3371b9.1694806866.git.strine= ss@HIDDEN> In-Reply-To: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strin= ess@HIDDEN> References: <73b2dfe98591073104fd069622ede2acab0c7655.1694806866.git.strine= ss@HIDDEN> From: Ulf Herrman <striness@HIDDEN> Date: Fri, 15 Sep 2023 08:53:10 -0500 Subject: [PATCH 5/5] build-system: dub: add #:ld-gold-wrapper to private-keywords. This isn't an accepted keyword to dub-build, so it will currently cause an error if it is specified, which rather defeats the purpose of having it as = an argument. Putting it in private-keywords will cause it to be stripped from the final bag arguments. * guix/build-system/dub.scm (lower): add #:ld-gold-wrapper to private-keywords. =2D-- guix/build-system/dub.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm index 1b9f21b052..b325357589 100644 =2D-- a/guix/build-system/dub.scm +++ b/guix/build-system/dub.scm @@ -112,7 +112,8 @@ (define* (lower name "Return a bag for NAME." =20 (define private-keywords =2D '(#:target #:ldc #:dub #:pkg-config #:inputs #:native-inputs #:outpu= ts)) + '(#:target #:ldc #:dub #:pkg-config #:ld-gold-wrapper + #:inputs #:native-inputs #:outputs)) =20 (and (not target) ;; TODO: support cross-compilation (bag =2D-=20 2.40.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUFeTYUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mimLgv/d4J6jnXH+6Ujbx1z0WbaCkv3/r6b zF0t6mkNiSQ08tjHJZcg1HKq/hXnObe8CTOt+i+AS94/2DmQRBAz5M4GcerbNglY sMaFyhgxzCW2e8TBsPGD+9TAwJrIvwmSBLUDDGmhEi7u40oIXjqcZUUAXjqBVpw9 I0WAP7b8k8C1Wf/Gr2BIR7Y88ahqwt3nKtLKir5OCD/1o7vY3bI3DHN5MIEtRyli yMEPbhy274ToGPhU84EeirJI9+Ug7zynNy3lyKiw7XcCiVNPBurEiX4rUBbQXHy0 XnHp21lYQrvyzs0nbESN6JAQPHmLpM4V/TwM7g/eEZi+dgz42WQC6rNMZgOk6rsY ba5jSfImiQnqOL4dIHHl6WMhHG9X1iJZmEXvq36U9UwoBmxwkhwHZSoqAA7sCdVi k2S14IE9ptaTQ2MdA8v2nPP1cbgT80YZKHPLRwOILpPEeWxIOCXHGK/FEBw9ifJ1 pfkM7j0Q3tAFL4cnwwRHnTr6X+cBOWg0y/GJ =Aisx -----END PGP SIGNATURE----- --==-=-=--
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 5 Sep 2023 16:06:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 12:06:12 2023 Received: from localhost ([127.0.0.1]:58114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdYZ9-0002F4-Ss for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 12:06:12 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:41072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zimon.toutoune@HIDDEN>) id 1qdYZ6-0002Do-PM for 65665 <at> debbugs.gnu.org; Tue, 05 Sep 2023 12:06:09 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2bcce32ccd4so9913951fa.0 for <65665 <at> debbugs.gnu.org>; Tue, 05 Sep 2023 09:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693929962; x=1694534762; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=i2E4Jmf1hxkUIOQ+zXtGiH5T+kShgW7uxnOOGbw0RDw=; b=Ik8aSbNYTrCNTnr6mZqDLZXTYcPR418jq86geRdRnb2+OoXm9Z++fBnnJl7vW2lG2V 1UfbFlbi5XKQO+cWj/qmaqEm+Dq66N/t9Y3/gdkmPl54tok+VsQa3hov5hlzCJ2hd/v/ l0pKEOZd44ibFJH362AOFXbpQlqZCsrisnLLPNkdo92Lpb38CwGvWH10UYY4AN9aiIIK JDYEaBJGoezR5QEw2J4CzVAMxOBf5yuPL6QnlHkV4bueWBnQ9SPR4u/PD+rFKNEzcj/p wxMJ1xDbRWdvGF84A7xM0wBCN2WUIJrPIHzcm2oBCN1hBiI1zJ8DaW0tgYSMGgs0hXx0 aq6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693929962; x=1694534762; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i2E4Jmf1hxkUIOQ+zXtGiH5T+kShgW7uxnOOGbw0RDw=; b=ZWXUiuO87U3+Ea/MbxfENJQzHD8bX5fZnsfFPP7Y/VZ2nKj36Yp8Z/cMjPYzGXFeRe u6/t4/81Z2S8AbAT18BSHSOqwwpyKl/SsfRjomvaaHdWWyWYzDIflR98NTSsiQ+mw4bT Ic83UsGQWgBVrr5ZGMH/RNWanywpbcjai5GQr8VRCyAQV2CsTlpVsguNhC8EoBi7vmGR toJetK4L3esReub7ob1qUNWsiGbhDYdX9QIY8v1ic7CiLgDC64tNRHaKTXDDrDPcby8Z b4GTaigmo8KKOr8woWsSe0t3IIrFVZx3pbT3IQ+OAk7Vl26Q0xaVmZBQCQnCH5xKO5JI 2x0Q== X-Gm-Message-State: AOJu0YxEW0J/vPg9hhY+q+qjHbhRjAGvk4InRO3vr89UgXIMTdpVGH8N IwdYu9JQcvNbpNTDeGOq1nINWGTqiio= X-Google-Smtp-Source: AGHT+IEtxpc9WdGEApOZWztRpfWtDvw/9//y424Ylp03FEdaQZrpG0sER2VBM9xxeFD5O9IkwQjsFA== X-Received: by 2002:a05:651c:10a8:b0:2bc:ebb9:9544 with SMTP id k8-20020a05651c10a800b002bcebb99544mr9064486ljn.5.1693929962249; Tue, 05 Sep 2023 09:06:02 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id k8-20020a5d4288000000b003176aa612b1sm17840914wrq.38.2023.09.05.09.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 09:06:01 -0700 (PDT) From: Simon Tournier <zimon.toutoune@HIDDEN> To: Ulf Herrman <striness@HIDDEN>, 65665 <at> debbugs.gnu.org Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs In-Reply-To: <87h6ofufy5.fsf@HIDDEN> References: <87h6ofufy5.fsf@HIDDEN> Date: Tue, 05 Sep 2023 16:57:15 +0200 Message-ID: <868r9ku0qc.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65665 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, On Thu, 31 Aug 2023 at 15:14, Ulf Herrman <striness@HIDDEN> wrote: > I propose that we have the build system lower procedure (that is, the > one that converts from package to bag) completely fill in the argument > list with all defaults, and we modify build-system-with-package-mapping > to transform all arguments that look like a package or a list of > packages (or maybe even a tree containing packages). On principle, this looks a good idea. Do you already have an implementation? Because transformations lead to headache and sometimes the implementation is hard, well evil, details and all that. :-) Cheers, simon
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 3 Sep 2023 13:02:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 09:02:54 2023 Received: from localhost ([127.0.0.1]:40003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qcmkf-0000xg-TR for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 09:02:54 -0400 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]:48613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qcmkc-0000xR-K6 for 65665 <at> debbugs.gnu.org; Sun, 03 Sep 2023 09:02:52 -0400 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-6bf58009a8dso507161a34.1 for <65665 <at> debbugs.gnu.org>; Sun, 03 Sep 2023 06:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693746154; x=1694350954; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=kPazCQz/y+Adq8LNGxjrB1xJxBbFByZ6WziammRhVc8=; b=Li9HaKgnEOP+EWjLWmaztvFlGxVF9QAfPiOzMdrJ3lFdmD8Nxn4j5h0woy6CndT6HR PHrrz97jqbBv93bmUPPvElr4MjzgstIKiLyoZS+ey9Mu/aOeFXlta3C/l1bldUbT94lz 1ZQLsqSEZ7PVRfTikQAY6/a37bisIGs1RFXva/MEu3zKbRo0728e9sFxqkLbbxCFHK4y CYV5UgINz9CwtzZCELByuCCDMrU7XfAbZ9ZDiq5aMZRm6YyNmjwHGMAilXo3m23GZ4Pl jBeVEcm3VRAn784DhL0hLhd2+a9ogvcCKejMVGNKNAkpzrhxYtARbQPu32HTN+cbdrId mQvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693746154; x=1694350954; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kPazCQz/y+Adq8LNGxjrB1xJxBbFByZ6WziammRhVc8=; b=bAI57qRGB/m9gyeY5QnjAadqbXaHl2qIXQvfACuhrLSy9JbAXN9cIrm2XcgbfGBdab fNzFFCYmd7Co5cJ9cFVYXuo1Lv9/WK7lzqqB2+/YHNjCGSe/A2tPtGEMRTW9X3bK1ak+ HOri6rTwBuLm+3b6PryF04Eq/P2B08aY1ymq8obIcFfZbK2fpJt1MOwnU4e1h7siep1/ D/0xe1Z3dDFIea/9PbLuCxGivNONMU2onbhISqezyoBBaAv8XS74qcZaRVaJ/rmBJBcD HhuIaGdcUpHb3qRaf9fj7oXYNHNjXfR6DeJ70+ernuNOGZkm5VNHmsD2WiYXICHuqQrI 95sQ== X-Gm-Message-State: AOJu0YyISkfYQsq97O8C+NwskE4NhqkvVzOZ4Tk9VTR3zMFhFAuqWsdP wU+2e0JtwxlQgt6+7HiGNHk= X-Google-Smtp-Source: AGHT+IEJ+DJ09Y4d9KyR23a+x1OKs797Cvr3jVlDvHVEZcjxhHg2H5MXhb3RUh/b2MeEoBP5fCiDlQ== X-Received: by 2002:a9d:4d84:0:b0:6bd:63b:4b21 with SMTP id u4-20020a9d4d84000000b006bd063b4b21mr7289622otk.15.1693746154390; Sun, 03 Sep 2023 06:02:34 -0700 (PDT) Received: from hurd (dsl-10-135-141.b2b2c.ca. [72.10.135.141]) by smtp.gmail.com with ESMTPSA id d4-20020a05620a140400b0075772c756e0sm2689580qkj.101.2023.09.03.06.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Sep 2023 06:02:33 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs References: <87h6ofufy5.fsf@HIDDEN> Date: Sun, 03 Sep 2023 09:02:31 -0400 In-Reply-To: <87h6ofufy5.fsf@HIDDEN> (Ulf Herrman's message of "Thu, 31 Aug 2023 15:14:58 -0500") Message-ID: <875y4rwgt4.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65665 Cc: dev@HIDDEN, zimon.toutoune@HIDDEN, othacehe@HIDDEN, ludo@HIDDEN, me@HIDDEN, 65665 <at> debbugs.gnu.org, rekado@HIDDEN, guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello Ulf, Ulf Herrman <striness@HIDDEN> writes: > #:deep? #t currently works by interposing a dummy build system that > lowers the package to a bag using the original build system, then > applies the supplied transformation to all of the bag's inputs, then > returns a new bag with the new inputs. > > The problem with this approach is that it doesn't affect the bag > arguments. This means that packages passed in as arguments may still > end up being used without being transformed. Worse still, packages > *not* passed in as arguments may end up being used *unless one is > explicitly passed in as an argument*, as is the case with > qt-build-system's #:qtbase argument. > > In short, the current approach of having the build-system lower > procedure leave the arguments mostly unchanged and letting the > bag->derivation procedure (the "bag builder") fill in lots of defaults > means that there are implicit inputs that cannot be touched at the > package level without adding special logic for every single build system > that does something like this. This is indeed sub-optimal! > I propose that we have the build system lower procedure (that is, the > one that converts from package to bag) completely fill in the argument > list with all defaults, and we modify build-system-with-package-mapping > to transform all arguments that look like a package or a list of > packages (or maybe even a tree containing packages). [...] > What do you think? Like Csepp, I like your proposition! I'm CC'ing the core team, in case they have something to add to it, but otherwise, we only need a volunteer to turn it into code :-). -- Thanks, Maxim
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at 65665) by debbugs.gnu.org; 1 Sep 2023 18:09:27 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 01 14:09:27 2023 Received: from localhost ([127.0.0.1]:33833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qc8aF-0001uR-7K for submit <at> debbugs.gnu.org; Fri, 01 Sep 2023 14:09:27 -0400 Received: from mx1.riseup.net ([198.252.153.129]:50174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <raingloom@HIDDEN>) id 1qc8aD-0001uD-Hi for 65665 <at> debbugs.gnu.org; Fri, 01 Sep 2023 14:09:25 -0400 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4RcmJ652fFzDqJg; Fri, 1 Sep 2023 18:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1693591750; bh=peL9lFRxGDvwEKtCSpbLmRVPj1mhQJaxIce3EFdPIDY=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=fdl6ydxC1RggGA97xM1zlwwOz731eSnozlmobaPzmpxWfwkH+SJTCjJ2wgN7Jsa4s Css/Cpxp1HZsKKsg2xxIj3Vey53iKNLG+/z7Y8v+CZnf1WBjTjp3fRHOOhHwz+69pC euGqiMN0F3EP7UM/L4k5HwXCyLLcu0JR1dEWEIrE= X-Riseup-User-ID: AD94D5F16E7C51D0791147B5896CD0977BC8A7393169784D8D67CF14068C350A Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4RcmJ56v8fzJn8q; Fri, 1 Sep 2023 18:09:09 +0000 (UTC) References: <87h6ofufy5.fsf@HIDDEN> From: Csepp <raingloom@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs Date: Fri, 01 Sep 2023 20:08:53 +0200 In-reply-to: <87h6ofufy5.fsf@HIDDEN> Message-ID: <87zg25hikd.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 65665 Cc: bug-guix@HIDDEN, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Ulf Herrman <striness@HIDDEN> writes: > [[PGP Signed Part:Undecided]] > #:deep? #t currently works by interposing a dummy build system that > lowers the package to a bag using the original build system, then > applies the supplied transformation to all of the bag's inputs, then > returns a new bag with the new inputs. > > The problem with this approach is that it doesn't affect the bag > arguments. This means that packages passed in as arguments may still > end up being used without being transformed. Worse still, packages > *not* passed in as arguments may end up being used *unless one is > explicitly passed in as an argument*, as is the case with > qt-build-system's #:qtbase argument. > > In short, the current approach of having the build-system lower > procedure leave the arguments mostly unchanged and letting the > bag->derivation procedure (the "bag builder") fill in lots of defaults > means that there are implicit inputs that cannot be touched at the > package level without adding special logic for every single build system > that does something like this. > > I propose that we have the build system lower procedure (that is, the > one that converts from package to bag) completely fill in the argument > list with all defaults, and we modify build-system-with-package-mapping > to transform all arguments that look like a package or a list of > packages (or maybe even a tree containing packages). > > Many large-scale package transformations have their purpose defeated if > even a single package slips through and has to be built or downloaded > separately (e.g. "I wanted to use a more minimal version of P, and now I > have both the original version of P *and* a more minimal version of P > *and* a duplicate copy of a large portion of the package graph..."). In > fact, in some situations, this could cause exponential growth of the > number of packages, e.g. a transformation is applied to qtbase and its > dependencies, but not to the implicit version and its dependencies, so > now all the dependencies of qtbase are duplicated, and if this happens > again at a higher level with something that depends on a package with > qt-build-system, now there are four duplicate subgraphs, and so on. > > What do you think? > > - Ulf > > [[End of PGP Signed Part]] Sounds like a good idea to me.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 1 Sep 2023 18:09:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 01 14:09:34 2023 Received: from localhost ([127.0.0.1]:33836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qc8aM-0001uk-K7 for submit <at> debbugs.gnu.org; Fri, 01 Sep 2023 14:09:34 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <raingloom@HIDDEN>) id 1qc8aK-0001uP-FM for submit <at> debbugs.gnu.org; Fri, 01 Sep 2023 14:09:33 -0400 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 <raingloom@HIDDEN>) id 1qc8a4-0002T5-FW for bug-guix@HIDDEN; Fri, 01 Sep 2023 14:09:16 -0400 Received: from mx1.riseup.net ([198.252.153.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <raingloom@HIDDEN>) id 1qc8a1-0006eN-5Z for bug-guix@HIDDEN; Fri, 01 Sep 2023 14:09:15 -0400 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4RcmJ652fFzDqJg; Fri, 1 Sep 2023 18:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1693591750; bh=peL9lFRxGDvwEKtCSpbLmRVPj1mhQJaxIce3EFdPIDY=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=fdl6ydxC1RggGA97xM1zlwwOz731eSnozlmobaPzmpxWfwkH+SJTCjJ2wgN7Jsa4s Css/Cpxp1HZsKKsg2xxIj3Vey53iKNLG+/z7Y8v+CZnf1WBjTjp3fRHOOhHwz+69pC euGqiMN0F3EP7UM/L4k5HwXCyLLcu0JR1dEWEIrE= X-Riseup-User-ID: AD94D5F16E7C51D0791147B5896CD0977BC8A7393169784D8D67CF14068C350A Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4RcmJ56v8fzJn8q; Fri, 1 Sep 2023 18:09:09 +0000 (UTC) References: <87h6ofufy5.fsf@HIDDEN> From: Csepp <raingloom@HIDDEN> To: Ulf Herrman <striness@HIDDEN> Subject: Re: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs Date: Fri, 01 Sep 2023 20:08:53 +0200 In-reply-to: <87h6ofufy5.fsf@HIDDEN> Message-ID: <87zg25hikd.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@HIDDEN; helo=mx1.riseup.net 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: bug-guix@HIDDEN, 65665 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Ulf Herrman <striness@HIDDEN> writes: > [[PGP Signed Part:Undecided]] > #:deep? #t currently works by interposing a dummy build system that > lowers the package to a bag using the original build system, then > applies the supplied transformation to all of the bag's inputs, then > returns a new bag with the new inputs. > > The problem with this approach is that it doesn't affect the bag > arguments. This means that packages passed in as arguments may still > end up being used without being transformed. Worse still, packages > *not* passed in as arguments may end up being used *unless one is > explicitly passed in as an argument*, as is the case with > qt-build-system's #:qtbase argument. > > In short, the current approach of having the build-system lower > procedure leave the arguments mostly unchanged and letting the > bag->derivation procedure (the "bag builder") fill in lots of defaults > means that there are implicit inputs that cannot be touched at the > package level without adding special logic for every single build system > that does something like this. > > I propose that we have the build system lower procedure (that is, the > one that converts from package to bag) completely fill in the argument > list with all defaults, and we modify build-system-with-package-mapping > to transform all arguments that look like a package or a list of > packages (or maybe even a tree containing packages). > > Many large-scale package transformations have their purpose defeated if > even a single package slips through and has to be built or downloaded > separately (e.g. "I wanted to use a more minimal version of P, and now I > have both the original version of P *and* a more minimal version of P > *and* a duplicate copy of a large portion of the package graph..."). In > fact, in some situations, this could cause exponential growth of the > number of packages, e.g. a transformation is applied to qtbase and its > dependencies, but not to the implicit version and its dependencies, so > now all the dependencies of qtbase are duplicated, and if this happens > again at a higher level with something that depends on a package with > qt-build-system, now there are four duplicate subgraphs, and so on. > > What do you think? > > - Ulf > > [[End of PGP Signed Part]] Sounds like a good idea to me.
bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 31 Aug 2023 20:15:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 31 16:15:46 2023 Received: from localhost ([127.0.0.1]:59302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qbo4v-0008K3-Sz for submit <at> debbugs.gnu.org; Thu, 31 Aug 2023 16:15:46 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <striness@HIDDEN>) id 1qbo4u-0008Jr-Ha for submit <at> debbugs.gnu.org; Thu, 31 Aug 2023 16:15:45 -0400 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 <striness@HIDDEN>) id 1qbo4g-0000bv-Gh for bug-guix@HIDDEN; Thu, 31 Aug 2023 16:15:30 -0400 Received: from tilde.club ([2607:5300:204:4340::114]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <striness@HIDDEN>) id 1qbo4e-0007qZ-Bo for bug-guix@HIDDEN; Thu, 31 Aug 2023 16:15:30 -0400 Received: by tilde.club (Postfix, from userid 5378) id 782AC2230E27B; Thu, 31 Aug 2023 20:15:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 782AC2230E27B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1693512925; bh=dd38u7mL08PfsKke01w/EU/tIGYtgf9eg83p8YlRQAk=; h=From:To:Subject:Date:From; b=UGh/OkaCnXDAoADjrnWWRLljzApjQdQAKJP3tqkk0kF6wXCqm60KGetJt9UMDViz1 T7lGox8Jv2iLwksXxaEWiZwgARbCkb+mFicyJX+U2RS7eic3brAXbxKwLbXAOYZk/p piYZHroa3sldTj/pb5wuJMyWhbSVD7zIrInuk4AM= From: Ulf Herrman <striness@HIDDEN> To: bug-guix@HIDDEN Subject: package-mapping with #:deep? #t doesn't get all the implicit inputs Date: Thu, 31 Aug 2023 15:14:58 -0500 Message-ID: <87h6ofufy5.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:5300:204:4340::114; envelope-from=striness@HIDDEN; helo=tilde.club X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain #:deep? #t currently works by interposing a dummy build system that lowers the package to a bag using the original build system, then applies the supplied transformation to all of the bag's inputs, then returns a new bag with the new inputs. The problem with this approach is that it doesn't affect the bag arguments. This means that packages passed in as arguments may still end up being used without being transformed. Worse still, packages *not* passed in as arguments may end up being used *unless one is explicitly passed in as an argument*, as is the case with qt-build-system's #:qtbase argument. In short, the current approach of having the build-system lower procedure leave the arguments mostly unchanged and letting the bag->derivation procedure (the "bag builder") fill in lots of defaults means that there are implicit inputs that cannot be touched at the package level without adding special logic for every single build system that does something like this. I propose that we have the build system lower procedure (that is, the one that converts from package to bag) completely fill in the argument list with all defaults, and we modify build-system-with-package-mapping to transform all arguments that look like a package or a list of packages (or maybe even a tree containing packages). Many large-scale package transformations have their purpose defeated if even a single package slips through and has to be built or downloaded separately (e.g. "I wanted to use a more minimal version of P, and now I have both the original version of P *and* a more minimal version of P *and* a duplicate copy of a large portion of the package graph..."). In fact, in some situations, this could cause exponential growth of the number of packages, e.g. a transformation is applied to qtbase and its dependencies, but not to the implicit version and its dependencies, so now all the dependencies of qtbase are duplicated, and if this happens again at a higher level with something that depends on a package with qt-build-system, now there are four duplicate subgraphs, and so on. What do you think? - Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmTw9MkUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mhnnAwAmtKewwrTyG+f8sVRzZwHlipENflt rQZmeK7LmkD2I6F4IG8tay+ro/ylIX3dFs2FPUDkBqY1biewXXO3M7Po3/oIUY3b II16LQcp+FtJ8S8GZTHZnAdFgVoqVBiot5zftDCZCOQxZj/nbqFvT9EjAuUn6aCd eEod96rS+VeecDQEvHiCr/x5B9OcMkgulo4Y6uv9GtxeE1vBj1FxV6dGCj6epPWP Zj5+ED6P04T9vxXCmrlXMqtZBEZn7oQOauADribIQF/KAaqjuo+vjVyUorCCjkf9 wT+ukY2vikCd9esz+JJ7VXdRBS4q8RQ6kXIKdNvcJx2LdDgxPtF8+Iz2xls/J5sb OoJvzRsfS1CTR8ZoTi92Nx+5DKl2qF5cRGlM78Ckowf0rhEs7VNwKDcJSe8nyUfy LA43PXlB9J1NpzU9o9jAM6mM3rdxjGLf9lL0ARF9T3+XTu+XvVF4lHSdrQjsknMH oILI2U6DOHsdUbpWOMk9wWkk8NwzXDN2cNGd =3EXK -----END PGP SIGNATURE----- --=-=-=--
Ulf Herrman <striness@HIDDEN>
:bug-guix@HIDDEN
.
Full text available.bug-guix@HIDDEN
:bug#65665
; Package guix
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.