From patchwork Mon Jan 8 08:02:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 58641 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 CCCBA27BBEC; Mon, 8 Jan 2024 08:06:31 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 2FC1027BBEA for ; Mon, 8 Jan 2024 08:06:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMkd5-0003Il-AB; Mon, 08 Jan 2024 03:05:03 -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 1rMkd2-0003HU-Ub for guix-patches@gnu.org; Mon, 08 Jan 2024 03:05:00 -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 1rMkd2-0002n8-MV for guix-patches@gnu.org; Mon, 08 Jan 2024 03:05:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMkd8-00081N-LL for guix-patches@gnu.org; Mon, 08 Jan 2024 03:05:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68315] [PATCH 08/48] build-system: cargo: Redefine cargo-build and cargo-cross-build. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Jan 2024 08:05:06 +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.170470105630213 (code B ref 68315); Mon, 08 Jan 2024 08:05:06 +0000 Received: (at 68315) by debbugs.gnu.org; 8 Jan 2024 08:04:16 +0000 Received: from localhost ([127.0.0.1]:34920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMkcJ-0007r9-R8 for submit@debbugs.gnu.org; Mon, 08 Jan 2024 03:04:16 -0500 Received: from 6.mo584.mail-out.ovh.net ([188.165.36.253]:51165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMkcG-0007qI-SU for 68315@debbugs.gnu.org; Mon, 08 Jan 2024 03:04:14 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.25.249]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 33CC5290DD for <68315@debbugs.gnu.org>; Mon, 8 Jan 2024 08:04:05 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-6vv46 (unknown [10.108.2.220]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id E224C1FEB5; Mon, 8 Jan 2024 08:04:04 +0000 (UTC) Received: from ngraves.fr ([37.59.142.95]) by ghost-submission-6684bf9d7b-6vv46 with ESMTPSA id dwdUM3Ssm2UXCwAAnq3mBQ (envelope-from ); Mon, 08 Jan 2024 08:04:04 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-95G001134795f7-db16-469b-a43a-68fba6414f09, 93F3D688BC7B2D554E6C57CDC3775C4FA39180DF) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Mon, 8 Jan 2024 09:02:40 +0100 Message-ID: <20240108080350.1665-8-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 X-Ovh-Tracer-Id: 12426838750817608418 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehiedgheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddrleehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeikeefudehseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth 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/cargo.scm (cargo-build): Monadic procedure returns a gexp instead of a derivation. (cargo-cross-build): Monadic procedure returns a gexp instead of a derivation. Change-Id: If1151e9222170f2eb3a92d43debc61c696c2e72d --- guix/build-system/cargo.scm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index c029cc1dda..8576aeaf59 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2019 Ivan Petkov ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Efraim Flashner +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -126,11 +127,8 @@ (define builder (map search-path-specification->sexp search-paths)))))) - (gexp->derivation name builder - #:system system - #:target #f - #:graft? #f - #:guile-for-build guile)) + (mbegin %store-monad + (return builder))) (define* (cargo-cross-build name #:key @@ -186,14 +184,11 @@ (define builder (map search-path-specification->sexp search-paths)) #:native-search-paths '#$(sexp->gexp - (map search-path-specification->sexp - native-search-paths)))))) + (map search-path-specification->sexp + native-search-paths)))))) - (gexp->derivation name builder - #:system system - #:target target - #:graft? #f - #:guile-for-build guile)) + (mbegin %store-monad + (return builder))) (define (package-cargo-inputs p) (apply