From patchwork Fri Apr 25 00:04:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 41995 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 3059C27BC4A; Fri, 25 Apr 2025 01:07:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 7455327BC49 for ; Fri, 25 Apr 2025 01:07:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u86aQ-0005gY-53; Thu, 24 Apr 2025 20:06:34 -0400 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 1u86Zw-0005cD-63 for guix-patches@gnu.org; Thu, 24 Apr 2025 20:06:06 -0400 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 1u86Zv-00033s-K5 for guix-patches@gnu.org; Thu, 24 Apr 2025 20:06:03 -0400 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=/d6mz+SKT2aK9ebPjs7TpPMcIxrZGwL7B/OCF/OKMak=; b=OyTvk9uGHmgeXRhAkvidNQsK0d2dmklz5LB1rmq45/txVoicjlRlRAKxvhqCu7jSZX3utrmO7Pz3XLWBdKBRJD9W85akqX5Hu1OT+WfXC9nIKF36PHjPkoZtJRyCwOQMKzLUUZ4PUol8sUU/Na1I4MKuwyTRZb+aAL/GdHu5RUwAPil5FpJ3ggAZc9/ZrqCtixs+CyfSNqiTMUeDVPvpSjweAr5pHQS2tcAPf79VTOsEJxUAgL+RmiMgxbjhoYRyuE5kxe7aexoydVq/mrpwwzTeTBsA6lTxMWtTZkUJQ+HB/VG7L7xOqh96oCVmB0bfmuLbM77lrHabQYUKb0HwJg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u86Zv-0002HQ-Cj for guix-patches@gnu.org; Thu, 24 Apr 2025 20:06:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78050] [PATCH 4/5] build-system: ruby: Improve ruby-cross-build style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Apr 2025 00:06:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78050@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78050-submit@debbugs.gnu.org id=B78050.17455395158615 (code B ref 78050); Fri, 25 Apr 2025 00:06:03 +0000 Received: (at 78050) by debbugs.gnu.org; 25 Apr 2025 00:05:15 +0000 Received: from localhost ([127.0.0.1]:42826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u86Z8-0002Ei-EZ for submit@debbugs.gnu.org; Thu, 24 Apr 2025 20:05:14 -0400 Received: from 7.mo562.mail-out.ovh.net ([46.105.55.234]:59963) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u86Z4-0002Aa-5o for 78050@debbugs.gnu.org; Thu, 24 Apr 2025 20:05:10 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZkClS3wCZz1cdj; Fri, 25 Apr 2025 00:05:08 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78050@debbugs.gnu.org>; Fri, 25 Apr 2025 00:05:08 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.17.28]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZkClS1bTSzHcF1; Fri, 25 Apr 2025 00:05:08 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.6]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 7080BC3A4C; Fri, 25 Apr 2025 00:05:07 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-113S007fabd4441-a359-4b22-b767-c9d51dabae6e, 0A0AE3EC9A8D3E829919296CBA8C7C69D15B3FB7) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Fri, 25 Apr 2025 02:04:49 +0200 Message-ID: <20250425000456.14363-4-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250425000456.14363-1-ngraves@ngraves.fr> References: <20250425000456.14363-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 15110702650236592866 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvhedtkeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdehtdesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=/d6mz+SKT2aK9ebPjs7TpPMcIxrZGwL7B/OCF/OKMak=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745539508; v=1; b=WuAsFER33FeAttrkHQB4izkcw9bHD58SzFua+i1SS3A04TasmK1DcVgHfEWTxh/bbN0cDq58 p34t+67aiHPICFjt4VzToRYMuXuGeLJesf5o9ZMKIraKy241lXUICLj2mxXb/8nWFz4sqZCBOEG ZrabxoJ88GlZZQPdNK4gV4q7MLT7og/GQS/r4sLQ6FiDeJ5huPkjNgNHnX73Nu3QoKIiLi05Ai6 nTwXQt2u2jZ3BuMEviKf1T0Q00DzPv3J8OPN0w2TwedcqG9WOjzLpNoCI7RJqNp5NT92mqEZ6JA 4xgTRF8jarwvssTx4Dpk6oZocMniXkEnqF+AsFPhJ04Xg== 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/ruby.scm (ruby-cross-build): Use with-imported-modules around the ruby-cross-build builder gexp. Change-Id: I1051124f034f2082ccef531e9bcf37913d5a9449 --- guix/build-system/ruby.scm | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index 33aab5f7190..f258ade6e75 100644 --- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2014, 2015, 2021 Ludovic Courtès +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,24 +89,25 @@ (define* (ruby-build name inputs (guix build utils)))) "Build SOURCE using RUBY and INPUTS." (define build - #~(begin - (use-modules #$@(sexp->gexp modules)) + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) - #$(with-build-variables inputs outputs - #~(ruby-build #:name #$name - #:source #+source - #:system #$system - #:gem-flags #$gem-flags - #:test-target #$test-target - #:tests? #$tests? - #:phases #$(if (pair? phases) - (sexp->gexp phases) - phases) - #:outputs %outputs - #:search-paths '#$(sexp->gexp - (map search-path-specification->sexp - search-paths)) - #:inputs %build-inputs)))) + #$(with-build-variables inputs outputs + #~(ruby-build #:name #$name + #:source #+source + #:system #$system + #:gem-flags #$gem-flags + #:test-target #$test-target + #:tests? #$tests? + #:phases #$(if (pair? phases) + (sexp->gexp phases) + phases) + #:outputs %outputs + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:inputs %build-inputs))))) (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) system #:graft? #f))) @@ -113,7 +115,6 @@ (define build #:system system #:target #f #:graft? #f - #:modules imported-modules #:guile-for-build guile))) (define ruby-build-system