From patchwork Sun Feb 9 00:50:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 38380 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3CAFC27BBE2; Sun, 9 Feb 2025 00:54:49 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CD9DC27BBEA for ; Sun, 9 Feb 2025 00:54:48 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tgvZg-0004AX-GX; Sat, 08 Feb 2025 19:53:28 -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 1tgvZS-00042j-DB for guix-patches@gnu.org; Sat, 08 Feb 2025 19:53:16 -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 1tgvZR-0007nR-6v for guix-patches@gnu.org; Sat, 08 Feb 2025 19:53:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=73v+CDE8E6Xh4IT1AZQx4yxLTwPCIvQrMpoXkvruVmU=; b=ZROO4G1q0pAZO83gBD/8g2jxsYQZ6h76biqihyhLb4YxeZSpg/CEmUnwM10JgZvH9nImhXbxcav1hq5zpk5/9lSYU5LPpvF339ot8PHURKX6vqIgdCTQNfMjqfywIYPpfRxf0EJpSAJeg/Hp6jIaYkS40g+sBZXWdFZ2W2Cs8TeiIH4qAhh3E/ZVARFcjIWoocKuTOtdxdFSJC4I/BQRQQLlbNz8OVjabFtVVWL1Ha0PdoWivinXUbNSUSatmMStf3vZZpX8+jmx/P+04551h3TpRjnYxtihGizqLcJ3UgYxo12XZuPVrNHg+n9TZGQXwwsgelG4b5TYxGmQsnhprw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tgvZR-0007Ee-0c for guix-patches@gnu.org; Sat, 08 Feb 2025 19:53:13 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68315] [PATCH v3 11/47] build-system: cmake: Redefine cmake-build and cmake-cross-build. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Feb 2025 00:53:12 +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 moreinfo To: 68315@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 68315-submit@debbugs.gnu.org id=B68315.173906237527485 (code B ref 68315); Sun, 09 Feb 2025 00:53:12 +0000 Received: (at 68315) by debbugs.gnu.org; 9 Feb 2025 00:52:55 +0000 Received: from localhost ([127.0.0.1]:42036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tgvZ9-000791-1p for submit@debbugs.gnu.org; Sat, 08 Feb 2025 19:52:55 -0500 Received: from 12.mo583.mail-out.ovh.net ([46.105.39.65]:58253) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tgvYp-00075A-5o for 68315@debbugs.gnu.org; Sat, 08 Feb 2025 19:52:35 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.2.54]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 4Yr8Lp27hyz1RjF for <68315@debbugs.gnu.org>; Sun, 9 Feb 2025 00:52:34 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-24xrx (unknown [10.110.113.149]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 0AB591FDB0; Sun, 9 Feb 2025 00:52:33 +0000 (UTC) Received: from ngraves.fr ([37.59.142.111]) by ghost-submission-5b5ff79f4f-24xrx with ESMTPSA id vcc9MVH8p2cmoQIA511UXw (envelope-from ); Sun, 09 Feb 2025 00:52:33 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-111S005926df0b6-7cfe-4db6-9217-0c7a708a771e, 5680413659C5D3F0AB4AC1D1E09FAEA3C919EDB8) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Sun, 9 Feb 2025 01:50:51 +0100 Message-ID: <20250209005219.25070-12-ngraves@ngraves.fr> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250209005219.25070-1-ngraves@ngraves.fr> References: <20250209005219.25070-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 18181594646429885154 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeffeejudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdelleegfeefteelkeeugedvhfetvdeuffeihfektdeljeekudevlefgudefudelnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegpdefjedrheelrddugedvrdduuddunecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeeikeefudehseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeefmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=73v+CDE8E6Xh4IT1AZQx4yxLTwPCIvQrMpoXkvruVmU=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1739062354; v=1; b=Gmr/+NSdFs9MlWV6sRh2ltnhDAZMdDqJic77N78Dx4vDmXEP6JSbfaGuG7LH/VDn72AqtGdf rXwEh9f/L7ECRh/+9e4AcA/sCJ1/0jZnTY5U9SC9CljwN7cAO06o6rhiCMQGyijD90EcH3wWZ68 HknxKtbBNfo47uwuoyMg9y90KTTxn3yjmCtFsO2tHonSj7ddypSnSup+O/SFazBrpmK7BIFmNJf UqQIqmdB7ppUr1MYBeSvEC7y1FiVYyjJQVxjINMLJl1oXTH5UWrHOjIkrnWtqMDqnUolh+IaogZ ht8HoJmEo1hWm64CziF1NF4G88RkSTd26Oq6FcqQ3AZMQ== 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 X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/build-system/cmake.scm (cmake-build): Monadic procedure returns a gexp instead of a derivation. Change-Id: I0c3ceb08391a38c52521416093d2c4b2ae869165 --- guix/build-system/cmake.scm | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 9d757c0d06..2051f71f88 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -129,7 +130,7 @@ (define* (cmake-build name inputs disallowed-references) "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." - (define build + (define builder (with-imported-modules imported-modules #~(begin (use-modules #$@(sexp->gexp modules)) @@ -161,16 +162,8 @@ (define build #:strip-flags #$strip-flags #:strip-directories #$strip-directories))))) - (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) - system #:graft? #f))) - (gexp->derivation name build - #:system system - #:target #f - #:graft? #f - #:substitutable? substitutable? - #:allowed-references allowed-references - #:disallowed-references disallowed-references - #:guile-for-build guile))) + (mbegin %store-monad + (return builder))) ;;; @@ -263,16 +256,8 @@ (define %outputs #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) - (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) - system #:graft? #f))) - (gexp->derivation name builder - #:system system - #:target target - #:graft? #f - #:substitutable? substitutable? - #:allowed-references allowed-references - #:disallowed-references disallowed-references - #:guile-for-build guile))) + (mbegin %store-monad + (return builder))) (define cmake-build-system (build-system