From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IJ7mDx2qKmW1cgAAauVa8A:P1 (envelope-from ) for ; Sat, 14 Oct 2023 16:47:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IJ7mDx2qKmW1cgAAauVa8A (envelope-from ) for ; Sat, 14 Oct 2023 16:47:57 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 06A79443F1 for ; Sat, 14 Oct 2023 16:47:57 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GgVGIMQz; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697294877; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=E7q/2zIgNDuzKDYip06tbLYf28jFqsyym9he5DNPDPI=; b=AlHRx1SuyhsIl8TVTOWm6lYIL7jGML+OUAiHVgKgu9X/t/QVEp3U/9XBYEemefkWXoLigr UI5vzzV0EVCli+ETzTgn82KjXnIyxqORTGwNuCwKTS+tbX+3LG8dhrHjCJWk96xkGr21ek Hm4yTTrqo80B9FsajgFSRxKctxNbKL6cLGbt1D/T1Wzk5sF+bBzI30iWDERETgT4IfdD/g PXq+krmP/WFRgdw6mg3VEW5wIDB9eIQkxylGWumNP8Z4b0akP6k1Y4xG42Jywk6L07nVCr zFQGf+gqXbUZeuLOHngK4o193ZScwVr1N09t0OjT4JH3boA4UC16EmoLHZquwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697294877; a=rsa-sha256; cv=none; b=pwH+q9nYVkOeIIWYcRogpOT/UnhoUgkLev0mPEpC2s/dM88ysVLMHTBut39+yf6VDUuT6V a2IluyYk9yRBEPW/5R0bDA+SX6bt9BnXUXYM6B8Ebut4OPpy6yrTH7nFBQ0W3eS+vYLuA+ DfEUL4FG10zgVUX/C9fM7XFuHDQUlFxUqVjH03vXGhc7I3rpLIzqQp85a3oa4HEh6CTe/h 5Ssj8O7e0bxuO2jQQXsrY+qzfNScm2sjlQWvcof09NznACNhSlIP3OBxLQmtBGCd+o1eqb pfiiVUWeF8OksQxXBy6GSEFt193WQpCKlvWT2uOo5OFS1ZANfDCdjGXQECrJGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GgVGIMQz; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrfvY-0008KL-6z; Sat, 14 Oct 2023 10:47:40 -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 ) id 1qrfvX-0008J9-2u for bug-guix@gnu.org; Sat, 14 Oct 2023 10:47:39 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrfvW-0006FA-QO for bug-guix@gnu.org; Sat, 14 Oct 2023 10:47:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrfvu-0006Mo-3N for bug-guix@gnu.org; Sat, 14 Oct 2023 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 14 Oct 2023 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65665 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: Ulf Herrman , 65665@debbugs.gnu.org Received: via spool by 65665-submit@debbugs.gnu.org id=B65665.169729488024455 (code B ref 65665); Sat, 14 Oct 2023 14:48:02 +0000 Received: (at 65665) by debbugs.gnu.org; 14 Oct 2023 14:48:00 +0000 Received: from localhost ([127.0.0.1]:50111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrfvr-0006MJ-GI for submit@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 ) id 1qrfvm-0006Lg-Pt for 65665@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 ) 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87h6mv96fy.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 12 Oct 2023 12:00:33 -0400") References: <87h6ofufy5.fsf@tilde.club> <87msxmqwng.fsf@tilde.club> <871qe0lytk.fsf_-_@gnu.org> <87h6mv96fy.fsf@gmail.com> 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,?= 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@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -5.88 X-Migadu-Queue-Id: 06A79443F1 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -5.88 X-TUID: WfyXRTVNmMZa --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Maxim Cournoyer 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. --=-=-=--