From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MPeLAZDU3WOmjQAAbAwnHQ (envelope-from ) for ; Sat, 04 Feb 2023 04:44:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id jz2eAJDU3WPyWwAAG6o9tA (envelope-from ) for ; Sat, 04 Feb 2023 04:44:16 +0100 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 41101E021 for ; Sat, 4 Feb 2023 04:44:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO9TA-0005LP-DE; Fri, 03 Feb 2023 22:44:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO9T8-0005L0-HG for guix-patches@gnu.org; Fri, 03 Feb 2023 22:44:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pO9T7-0005z4-T5 for guix-patches@gnu.org; Fri, 03 Feb 2023 22:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pO9T7-0007RS-PE for guix-patches@gnu.org; Fri, 03 Feb 2023 22:44:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Feb 2023 03:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61255 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Christopher Baines , Ricardo Wurmus , 61255@debbugs.gnu.org Received: via spool by 61255-submit@debbugs.gnu.org id=B61255.167548220728550 (code B ref 61255); Sat, 04 Feb 2023 03:44:01 +0000 Received: (at 61255) by debbugs.gnu.org; 4 Feb 2023 03:43:27 +0000 Received: from localhost ([127.0.0.1]:40323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pO9SY-0007QP-SS for submit@debbugs.gnu.org; Fri, 03 Feb 2023 22:43:27 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:42536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pO9SW-0007Q9-Ox for 61255@debbugs.gnu.org; Fri, 03 Feb 2023 22:43:25 -0500 Received: by mail-qt1-f178.google.com with SMTP id m26so7735454qtp.9 for <61255@debbugs.gnu.org>; Fri, 03 Feb 2023 19:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding: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=BHCyCWfUmfdn7IC3edUqalP/xvHdztp2j5g7imMtZNg=; b=RTdrAeyFGm+u4QbMg3dnvbJ0c+F0L0gg+mQ1yHQXSGeIac//2A082pH2E/DioJDAv6 juopy7n2+1hcDfD4wjvynMVyG7wEsRyMBP4xm7W7+mW9uqC9Ems+aDOGojcxhEjAbRHj anQNXnGaIldfx5914lXFruPMY2oxath3i02CGzHWf9+zgAYn/wTYAPtUQwbcuEFG4bwB 6301/KM8E+V6YAYmhDw1O8u0C/4T/P77OALGva1EUlqFcEg/GHTGO+TOFofT3MSQDnFA zVrA7MhHxMKrLwoDoPK/tSwdO85522yzhCj/b1svg5JxKIvJpsUkgQafBIsoKS3TUvLd b09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=BHCyCWfUmfdn7IC3edUqalP/xvHdztp2j5g7imMtZNg=; b=O2antWLeZ1i/oI4ikkfkOUrnofiKPtGkK0eqRsdrOnSimHezGX7rU3nAlh+c3nXYjG OKL00tDBPOzcLLvSaq9blv9zNY3RQPkbPaTkaaSwakTojSLai7+Eewzrv7JHzkoj+xID 1Kh15tH6iOOIEoPI6UbEYT/JudKVWsrn6Q7iatFouiwegzsOJrTcTh+buB0wW9Ts4MSM xcj3ToXIf8MzNgmtsBt67PnVREAvmCwtCZIlg8zZjhqJ9+ZM64j67djCZ12HLeGivfQn 0NlQ/iCiJDw6456GOK+KAjxYjc6GecUteiAVYkVPWwuVUW7lamjCnE/gvCsYwzMq/ReC ZL0A== X-Gm-Message-State: AO0yUKX4RXDIduhUky/m3wH3ng8kUnoWlnPikTjtkWFmRBRrZfWNb87f w/ByUauDnfXW+VZEYrk5Icg= X-Google-Smtp-Source: AK7set+k2NPVoaZP2/j2vgef+vCshsw7IcSNcRVkIWWaQF12lmWHHRlkwwrXZUhJwR0zuZaPVEq6dw== X-Received: by 2002:ac8:7d03:0:b0:3b8:2a6c:d1e4 with SMTP id g3-20020ac87d03000000b003b82a6cd1e4mr23067145qtb.23.1675482199283; Fri, 03 Feb 2023 19:43:19 -0800 (PST) Received: from hurd (dsl-10-136-177.b2b2c.ca. [72.10.136.177]) by smtp.gmail.com with ESMTPSA id c1-20020a05620a268100b007203bbbbb31sm3237383qkp.47.2023.02.03.19.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 19:43:18 -0800 (PST) From: Maxim Cournoyer References: <20230203221409.15886-2-maxim.cournoyer@gmail.com> <20230203221409.15886-3-maxim.cournoyer@gmail.com> <877cwyw7yc.fsf@gnu.org> Date: Fri, 03 Feb 2023 22:43:17 -0500 In-Reply-To: <877cwyw7yc.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 04 Feb 2023 02:11:23 +0100") Message-ID: <87h6w2p02y.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675482255; 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: content-transfer-encoding:content-transfer-encoding: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=BHCyCWfUmfdn7IC3edUqalP/xvHdztp2j5g7imMtZNg=; b=XlBX4T6EDjx3AxvPxPdHnYdtGcSvqRiyVzSYULVV1HA6rYi55xoIxQt/IT0bxNUYGaHu2I tqzP0rtU81Fe0nrxx6rNQ8VHx+iT6SdR/dFMMqJth7LkWh4F2GJMmiR0yyVN1YbAZyRMea rljZ9pLLEJch4ug97g4dTXZhU30BwnDu0S1u2Nd4UaSHk+MRIVX4zLrO3kRtgmnWiIYRUP 5PldBL1pfwVIgVUc1VZeGM5hY6vlxFskXhlelC8xTBp7nxKpgM4vNO8GdDHKKSdGCjv/fN ZnATd+3pU5k3dfjZI/HPQgg5zPY7cZuuzeBl931PEOs+RKHOhNmX93995tEkcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RTdrAeyF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675482255; a=rsa-sha256; cv=none; b=jdM68Ot6HWNsiGVce4IfFQyVIw1sr82+PERt2ljHivZfl0EH1O+BmMlQEBfvClTfoJtVbD WUJY9aR2wdsoTyglTYKSOnvXNrpIvt+bhgB76hqrL34hKG5uhoXqeNY1wpB5t0dpl5eeMm DL65mXsNLJ3VDOaoUWMZxRLS25tKRyHYr1z8W6AlKBVDd5jPTFPDIjZ+raScGOjF2NnhxI mY1BsDr1XOn7szzgdfzVBCsjiOEcafiTs0JL/0B9hpWqXG+jTIZZiYqBuLXfHf57PVY4zP cHMAGt6JdriC8lEvVX7J7zIVAyXeR83Sm3G51/dQ1R62fBZczUpSyLgDw98wfg== X-Migadu-Spam-Score: -0.48 X-Spam-Score: -0.48 X-Migadu-Queue-Id: 41101E021 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RTdrAeyF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn1.migadu.com X-TUID: yYJ87ivznbCd Hi Luvodic, Ludovic Court=C3=A8s writes: > Hello! > > Maxim Cournoyer skribis: > >> * guix/gexp.scm (computed-file): Set the default value of the #:guile ar= gument >> to that of the %guile-for-build parameter. > > [...] > >> (define* (computed-file name gexp >> - #:key guile (local-build? #t) (options '())) >> + #:key (guile (%guile-for-build)) >> + (local-build? #t) (options '())) > > I think that would lead =E2=80=98computed-file=E2=80=99 to pick (%guile-f= or-build) at > the wrong time (time of call instead of time of lowering). > > Commit ab25eb7caaf5571cc9f8d6397a1eae127d7e29d1 made it #f such that > =E2=80=98gexp->derivation=E2=80=99 gets to resolve it at the =E2=80=9Crig= ht=E2=80=9D time. I see! I think you are right. Would making the change in the associated gexp compiler do the right thing? Currently it ignores the %guile-for-build fluid as set in the tests/pack.scm test suite for example. Something like this: --8<---------------cut here---------------start------------->8--- modified guix/gexp.scm @@ -584,7 +584,7 @@ (define-record-type (options computed-file-options)) ;list of arguments =20 (define* (computed-file name gexp - #:key (guile (%guile-for-build)) + #:key guile (local-build? #t) (options '())) "Return an object representing the store item NAME, a file or directory computed by GEXP. When LOCAL-BUILD? is #t (the default), it ensures the @@ -601,7 +601,8 @@ (define-gexp-compiler (computed-file-compiler (file ) ;; gexp. (match file (($ name gexp guile options) - (mlet %store-monad ((guile (lower-object (or guile (default-guile)) + (mlet %store-monad ((guile (lower-object (or guile (%guile-for-build) + (default-guile)) system #:target #f))) (apply gexp->derivation name gexp #:guile-for-build guile #:system system #:target target options))))) --8<---------------cut here---------------end--------------->8--- I've verified that 'make check TESTS=3Dtests/pack.scm' is still happy (without such patch, with patch 3/5 applied, the "self-contained-tarball" would try to build a non-bootstrap guile and timeout (on my old machine). Thanks and enjoy FOSDEM! --=20 Maxim