From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eHmSA1x8nGUZ3gAAkFu2QA (envelope-from ) for ; Mon, 08 Jan 2024 23:51:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2E7nAFx8nGVfRgEAqHPOHw (envelope-from ) for ; Mon, 08 Jan 2024 23:51:08 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704754268; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: 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; bh=/p4IbEZt2yj2eHfIbJOzhYK9Mq5FpdbY59kwy5l8ZxY=; b=XCPB7n/D4GmHDFvwnQ1cXm2erFdw2xE9iHkDbt3aLIzvdSblGVEhDeH7vob5+1gQvlzgQz jFNSkDJKC39RYqp9IJ3oQmvAS0zjxwq3ZDBldKtQ+Fhp4DCAtbGQNjLyjKKKvlH+qO3otF ZBB76X1YmO2jdsRPnlmYmhXN55VjyCe1YM3Q3kKUF4ezQazaobFC/SW2q0a+k0lHXySMhE 3K6Uj75y19Q+y3L55iUA1nA2Jp3uoxjl00T1rQWcYyw0ws4ug8xdjwf/8XrWkQax7sqNT4 hllA2nnT7TfZqNOWNijXm5YhXVNmcXUQFar2pFii2vlzpfNQMmkeJ5PldqlqHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704754268; a=rsa-sha256; cv=none; b=PkIKzf9Q9Y8mUHG1zqkMwaN649wQUWyQ/iRnJLPtfy3MnbQkumKodJF9hMLTYRDgRuQZ+k ie3S1QtvVD1NE1RtnoY6oO2LeydR1xDcIU6U6/TarkAO0nKeksDeUBNpbB5a3jsRVnzpba su6rfSJ6skcVnYsAWxT1DT8RdEGPvD2NXTEcReyAUu2O8u6V0HwRlJ4tsuYS99HOba1pyE m7Y3pGHArW3FotegciaYAmZTIJo3W4AiltcGCARVrPlYkmUyppCz9DKapR6BDX8IkD3Ba0 1aZ2ON8xjK8ASjgy8o+Fy/AChw13cIRLZGEmgE2ouXXC2FJ3+x8D/ZtQkT9MBw== 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 854B7432BF for ; Mon, 8 Jan 2024 23:51:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMySP-0001CR-D3; Mon, 08 Jan 2024 17:50:57 -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 1rMySN-0001CI-Tn for guix-patches@gnu.org; Mon, 08 Jan 2024 17:50:55 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMySN-0001XC-Jo for guix-patches@gnu.org; Mon, 08 Jan 2024 17:50:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMyST-0008GM-LO for guix-patches@gnu.org; Mon, 08 Jan 2024 17:51:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68315] [PATCH 48/48] build-system: trivial: Redefine trivial-build functions. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Jan 2024 22:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68315 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68315@debbugs.gnu.org Received: via spool by 68315-submit@debbugs.gnu.org id=B68315.170475421331686 (code B ref 68315); Mon, 08 Jan 2024 22:51:01 +0000 Received: (at 68315) by debbugs.gnu.org; 8 Jan 2024 22:50:13 +0000 Received: from localhost ([127.0.0.1]:37829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMyRh-0008F0-8E for submit@debbugs.gnu.org; Mon, 08 Jan 2024 17:50:13 -0500 Received: from 19.mo550.mail-out.ovh.net ([178.32.97.206]:52615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMyRb-0008Eh-VG for 68315@debbugs.gnu.org; Mon, 08 Jan 2024 17:50:11 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.2.10]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id B8A0F294BE for <68315@debbugs.gnu.org>; Mon, 8 Jan 2024 22:49:59 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-wfqdl (unknown [10.110.113.80]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 8CE881FD7D for <68315@debbugs.gnu.org>; Mon, 8 Jan 2024 22:49:59 +0000 (UTC) Received: from ngraves.fr ([37.59.142.97]) by ghost-submission-6684bf9d7b-wfqdl with ESMTPSA id yZROHhd8nGWyMgMAxmln/g (envelope-from ) for <68315@debbugs.gnu.org>; Mon, 08 Jan 2024 22:49:59 +0000 X-OVh-ClientIp: 81.67.146.208 In-Reply-To: <20240108080350.1665-48-ngraves@ngraves.fr> References: <20240108080350.1665-1-ngraves@ngraves.fr> <20240108080350.1665-48-ngraves@ngraves.fr> Date: Mon, 08 Jan 2024 23:49:58 +0100 Message-ID: <871qarigo9.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 8941615586787713638 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehkedgtdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffujghffffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeeijeeukeekffevuedvhfefvdegheegiedtfefffeeltdefudduudelkeejheetudenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddrleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeikeefudehseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedtpdhmohguvgepshhmthhpohhuth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.79 X-Spam-Score: -6.79 X-Migadu-Queue-Id: 854B7432BF X-TUID: 6r0vTu5oBIrJ This last patch can be skipped if we want to avoid a lot of rebuilds, and it doesn't matter for easier extensibility since the trivial build-system is extensible.=20 On 2024-01-08 09:03, Nicolas Graves wrote: > * guix/build-system/trivial.scm > (trivial-build): Monadic procedure returns a gexp instead of a derivation. > (trivial-cross-build): Monadic procedure returns a gexp instead of a deri= vation. > > Change-Id: I261d5d5ae027a174eafa972e4f598afdc394caa3 > --- > guix/build-system/trivial.scm | 41 ++++++++++++++--------------------- > 1 file changed, 16 insertions(+), 25 deletions(-) > > diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm > index e08884baf1..bc71c94132 100644 > --- a/guix/build-system/trivial.scm > +++ b/guix/build-system/trivial.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2018, 2021 Ludovic Court=C3= =A8s > +;;; Copyright =C2=A9 2024 Nicolas Graves > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -51,18 +52,13 @@ (define* (trivial-build name inputs > search-paths allowed-references) > "Run build expression BUILDER, an expression, for SYSTEM. SOURCE is > ignored." > - (mlet %store-monad ((guile (package->derivation (or guile (default-gui= le)) > - system #:graft? #f)) > - (builder -> (if (pair? builder) > - (sexp->gexp builder) > - builder))) > - (gexp->derivation name (with-build-variables inputs outputs builder) > - #:system system > - #:target #f > - #:graft? #f > - #:modules modules > - #:allowed-references allowed-references > - #:guile-for-build guile))) > + (mlet* %store-monad ((builder -> (if (pair? builder) > + (sexp->gexp builder) > + builder))) > + (return (with-imported-modules modules > + #~(begin > + (use-modules #$@(sexp->gexp modules)) > + #$(with-build-variables inputs outputs builder)))))) >=20=20 > (define* (trivial-cross-build name > #:key > @@ -73,21 +69,16 @@ (define* (trivial-cross-build name > allowed-references) > "Run build expression BUILDER, an expression, for SYSTEM. SOURCE is > ignored." > - (mlet %store-monad ((guile (package->derivation (or guile (default-gu= ile)) > - system #:graft? #f)) > - (builder -> (if (pair? builder) > + (mlet* %store-monad ((builder -> (if (pair? builder) > (sexp->gexp builder) > builder))) > - (gexp->derivation name (with-build-variables > - (append build-inputs target-inputs host-i= nputs) > - outputs > - builder) > - #:system system > - #:target target > - #:graft? #f > - #:modules modules > - #:allowed-references allowed-references > - #:guile-for-build guile))) > + (return (with-imported-modules modules > + #~(begin > + (use-modules #$@(sexp->gexp modules)) > + #$(with-build-variables > + (append build-inputs target-inputs host-inputs) > + outputs > + builder)))))) >=20=20 > (define trivial-build-system > (build-system --=20 Best regards, Nicolas Graves