From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UMCuLAOtm2W7qwAAkFu2QA (envelope-from ) for ; Mon, 08 Jan 2024 09:06:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KKF4JwOtm2WKwgAA62LTzQ (envelope-from ) for ; Mon, 08 Jan 2024 09:06:27 +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=1704701187; h=from:from:sender:sender:reply-to: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; bh=yWE/ANiu6ou8aEGIaupKkYsXkqRa3cf+b3PmG2yli7Q=; b=trVlNUuBFB/2wSO09ytHx/xey9nuhJ6pLaQ5LVA36qNLVO77OTks82XI7UqyhZAkSXFAHz j7e5wq9oKjnQWEcwsLGdQvJ8r3vY6aTLsACMaGmB6GQeWTF/gt12sSfzthomN0jBOZmR40 8Dubd81cSbEIeOG2IaymClnf/qeM+zGBCiQLeYNQCKpYECdE2p4nDyrhwC7uBf35FS7Pmf g1EvuT/DUwDXeqS59V1NMiDZHv65s3hXuU4ocJM0uVkFHlkSo9SkRvyUb57XkwTyexR7qO x2Zz5x8xpUYWx+LEdHIgxlEsHP4KG+bej6RGVFH6kkYsFZ0+I0uDVvSdL0uFXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704701187; a=rsa-sha256; cv=none; b=iZ3vUnkf2nEZMpa7XwdkgQ41zBqxPPw4sitgoIlM8hthmhHwTQuT0zYuKDVKu8C8im12eb exB6dSEAG/2jpLo/nlPry4ETGcMOurwmFHqnpojW+ul/XSuRVKT7oiaJp1DaucuvPWkTir ztgDKZcGoddeB13fIKbSVTKcclcuXmlxsaJvNn2bzBnQL4vVLV075PKAeFPmAg5jyWyB9j GjdTW8P9+RNWMPvvtR5xtoU0+x2epmgcGKz7+ZQ/Fg7mOBphfLYTVDJuISpc12jM6lEjFO QkGdifUk3VP4Zlvxd4B5hE6E0cMj+U8HzgIBIegQos6ZMnIYUqmgAxjQNspZpg== 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 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 55B5845281 for ; Mon, 8 Jan 2024 09:06:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMkdM-0003bW-H2; Mon, 08 Jan 2024 03:05:20 -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 1rMkdL-0003aT-5H for guix-patches@gnu.org; Mon, 08 Jan 2024 03:05:19 -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 1rMkdK-00035e-SC for guix-patches@gnu.org; Mon, 08 Jan 2024 03:05:18 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMkdQ-00086n-RQ for guix-patches@gnu.org; Mon, 08 Jan 2024 03:05:24 -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 08:05:24 +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 Cc: ngraves@ngraves.fr Received: via spool by 68315-submit@debbugs.gnu.org id=B68315.170470111330972 (code B ref 68315); Mon, 08 Jan 2024 08:05:24 +0000 Received: (at 68315) by debbugs.gnu.org; 8 Jan 2024 08:05:13 +0000 Received: from localhost ([127.0.0.1]:35059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMkdF-00083T-9E for submit@debbugs.gnu.org; Mon, 08 Jan 2024 03:05:13 -0500 Received: from 6.mo561.mail-out.ovh.net ([188.165.43.173]:60657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMkd5-0007zw-Eg for 68315@debbugs.gnu.org; Mon, 08 Jan 2024 03:05:04 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.109.176.72]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 1EA3F297C4 for <68315@debbugs.gnu.org>; Mon, 8 Jan 2024 08:04:56 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-zpmqz (unknown [10.110.168.247]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id EDFAA1FEC4; Mon, 8 Jan 2024 08:04:55 +0000 (UTC) Received: from ngraves.fr ([37.59.142.105]) by ghost-submission-6684bf9d7b-zpmqz with ESMTPSA id X1v5OKesm2UtGQgAJbutug (envelope-from ); Mon, 08 Jan 2024 08:04:55 +0000 X-OVh-ClientIp: 81.67.146.208 Date: Mon, 8 Jan 2024 09:03:20 +0100 Message-ID: <20240108080350.1665-48-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240108080350.1665-1-ngraves@ngraves.fr> References: <20240108080350.1665-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 12441193974476759778 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehiedgheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddruddtheenucevlhhushhtvghrufhiiigvpedutdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeikeefudehseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.79 X-Spam-Score: -6.79 X-Migadu-Queue-Id: 55B5845281 X-Migadu-Scanner: mx11.migadu.com X-TUID: sOPnkornMryY * 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 derivation. 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 © 2012, 2013, 2014, 2015, 2018, 2021 Ludovic Courtès +;;; Copyright © 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-guile)) - 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)))))) (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-guile)) - 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-inputs) - 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)))))) (define trivial-build-system (build-system -- 2.41.0