From patchwork Fri Apr 25 09:26:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 41999 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 66E5B27BC4F; Fri, 25 Apr 2025 10:29:33 +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=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 F00AB27BC4A for ; Fri, 25 Apr 2025 10:29:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u8FMz-0005Bn-46; Fri, 25 Apr 2025 05:29:17 -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 1u8FMl-00056e-BU for guix-patches@gnu.org; Fri, 25 Apr 2025 05:29:04 -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 1u8FMk-0007pS-Si for guix-patches@gnu.org; Fri, 25 Apr 2025 05:29:02 -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=PY34uRAwadhi5GAn3F0xkisSYAoCdgA9nJSayToBi5U=; b=eau7UyPBUcX7sd0I0r5kD5K4yXCqitELTsFdi6ho8virejIF09Gqp0zwRMOk3tEiAJVxi2brKHwCDGihedCLzP4fcGXl6Yl4bMoksSTiVARM6tVTaFVp6qJQij6oKdNlRYHoyauUbUs3FiQxbe2LWPUSXEjuMgqmYKXrSgswDYoZmMX9G/JzXk4FbM23p1ZxHYflKyfVXOJbLvuXVH2VsErH3BoXH+xhohWSAiZw6W4GVEm0lMrfLJ5+j55eaSCb0c6lBsrJixO9Lky1FMEYSY6ow4iT5AqFfGiV0We5ZojAQacx190zFYv4KfKLS3E1EKIs8M/sI1e08ZyEoX0LGA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u8FMk-0000SR-Oc for guix-patches@gnu.org; Fri, 25 Apr 2025 05:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78050] [PATCH v2 2/5] build-system: glib-or-gtk: Improve glib-or-gtk-cross-build style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Apr 2025 09:29:02 +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.17455733061650 (code B ref 78050); Fri, 25 Apr 2025 09:29:02 +0000 Received: (at 78050) by debbugs.gnu.org; 25 Apr 2025 09:28:26 +0000 Received: from localhost ([127.0.0.1]:47371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8FM9-0000QX-7n for submit@debbugs.gnu.org; Fri, 25 Apr 2025 05:28:25 -0400 Received: from 9.mo563.mail-out.ovh.net ([46.105.73.201]:46409) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8FLw-0000P5-3H for 78050@debbugs.gnu.org; Fri, 25 Apr 2025 05:28:12 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZkSF51DZzz1dVk; Fri, 25 Apr 2025 09:28:09 +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 09:28:08 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.168.35]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZkSF462wjzHcF1; Fri, 25 Apr 2025 09:28:08 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.5]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 39198BA3F1A; Fri, 25 Apr 2025 09:28:08 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-95G00110890de6-7c88-45e3-9064-c6f1a16dae07, 0A0AE3EC9A8D3E829919296CBA8C7C69D15B3FB7) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Fri, 25 Apr 2025 11:26:31 +0200 Message-ID: <20250425092759.30369-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250425092759.30369-1-ngraves@ngraves.fr> References: <20250425092759.30369-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6172183291077190370 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheduleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedthedtseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehieefmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=PY34uRAwadhi5GAn3F0xkisSYAoCdgA9nJSayToBi5U=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745573289; v=1; b=LwFhJhGdKH73r77yVn7g1idzIhjjGIrQg5XM7RDHbWJ1UWrL2Bd1B6G6cuNMi8OxHNxT/z+/ og4xY7pbvDxovawKtt3b43zWt59RPwN5EYoYPn/4G2D5VO68tw+D/GNxes9B3FQ6VQr/7+JhEGr +mI6uJxCwOEh44o4S5WnXqOpcPveEl9iPXT6FMSIl6TTONuMQ0NtXajvLj15fDiPpiJxa/eOa1d CnS5/69hsl6sj4o8D7ZRApni8l8zXa4t1SSUP7tz/1MKUir6AMELU8T8DOTcDeEclXK1gdLh+o7 dXg5OWA4PLkt2STTReO++x3jo36VbFSN6tFbZFvM6P8pw== 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/glib-or-gtk.scm (glib-or-gtk-cross-build): Use with-imported-modules around the glib-or-gtk-cross-build builder gexp. Change-Id: I8eaa032ffc0a3f8dbf02c96a4ecee85475c32111 --- guix/build-system/glib-or-gtk.scm | 89 +++++++++++++++---------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 6c69a950e81..c912adab4aa 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -225,55 +225,55 @@ (define* (glib-or-gtk-cross-build name disallowed-references) "Cross-build SOURCE with INPUTS. See GNU-BUILD for more details." (define builder - #~(begin - (use-modules #$@(sexp->gexp modules)) + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) - (define %build-host-inputs - #+(input-tuples->gexp build-inputs)) + (define %build-host-inputs + #+(input-tuples->gexp build-inputs)) - (define %build-target-inputs - (append #$(input-tuples->gexp host-inputs) - #+(input-tuples->gexp target-inputs))) + (define %build-target-inputs + (append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs))) - (define %build-inputs - (append %build-host-inputs %build-target-inputs)) + (define %build-inputs + (append %build-host-inputs %build-target-inputs)) - (define %outputs - #$(outputs->gexp outputs)) - - (glib-or-gtk-build #:source #+source - #:system #$system - #:build #$build - #:target #$target - #:outputs %outputs - #:inputs %build-target-inputs - #:native-inputs %build-host-inputs - #:search-paths '#$(sexp->gexp - (map search-path-specification->sexp - search-paths)) - #:native-search-paths '#$(sexp->gexp - (map search-path-specification->sexp - native-search-paths)) - #:phases #$(if (pair? phases) - (sexp->gexp phases) - phases) - #:glib-or-gtk-wrap-excluded-outputs - #$glib-or-gtk-wrap-excluded-outputs - #:configure-flags #$configure-flags - #:make-flags #$make-flags - #:out-of-source? #$out-of-source? - #:tests? #$tests? - #:test-target #$test-target - #:parallel-build? #$parallel-build? - #:parallel-tests? #$parallel-tests? - #:validate-runpath? #$validate-runpath? - #:make-dynamic-linker-cache? #$make-dynamic-linker-cache? - #:patch-shebangs? #$patch-shebangs? - #:strip-binaries? #$strip-binaries? - #:strip-flags #$strip-flags - #:strip-directories - #$strip-directories))) + (define %outputs + #$(outputs->gexp outputs)) + (glib-or-gtk-build #:source #+source + #:system #$system + #:build #$build + #:target #$target + #:outputs %outputs + #:inputs %build-target-inputs + #:native-inputs %build-host-inputs + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases #$(if (pair? phases) + (sexp->gexp phases) + phases) + #:glib-or-gtk-wrap-excluded-outputs + #$glib-or-gtk-wrap-excluded-outputs + #:configure-flags #$configure-flags + #:make-flags #$make-flags + #:out-of-source? #$out-of-source? + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:make-dynamic-linker-cache? #$make-dynamic-linker-cache? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$strip-flags + #:strip-directories + #$strip-directories)))) (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) system #:graft? #f))) @@ -281,7 +281,6 @@ (define %outputs #:system system #:target target #:graft? #f - #:modules imported-modules #:allowed-references allowed-references #:disallowed-references disallowed-references #:guile-for-build guile)))