From patchwork Fri Apr 25 00:04:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 41991 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 8926B27BC4B; Fri, 25 Apr 2025 01:06:30 +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 425A727BC49 for ; Fri, 25 Apr 2025 01:06:29 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u86aB-0005cp-Au; Thu, 24 Apr 2025 20:06:22 -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 1u86Zu-0005c4-Oa for guix-patches@gnu.org; Thu, 24 Apr 2025 20:06:02 -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 1u86Zu-00033d-Fc for guix-patches@gnu.org; Thu, 24 Apr 2025 20:06: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=o2kx6R0mL/RPKzMP6ERUAHyKQ6k0KytLNQsyh4NWXU0=; b=sDmOdMApOrrxmijDpgea44XiQDFsAQr69CvpVDG6fN5n1uN4bERfdIqnIHwYa+nkTdflB0siGR3U1oW4sUisSySaJPhOBrK+eeKteInvGnrDd+1gG64o5SUJXiKSV/yvAJY+/+cGIkGPvXM6ayTjtBYIF+scpLRnEl9csdhiIsWaZcIIc44qwe2TZJItUhBwkpKpGGo/20Ke/g7Ra6SjOTZx3FPcT5biVFv+Xs3q6eEOH76AyjnCM2jxgsyASCEULimpCehdb+IkQ9OkoZSzLqAi3JK5XHl4y5AT6RYAt1EXegHnqAGfBJoLJCLFhyKSQpjPmYEWEKSl4NqgtpallQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u86Zu-0002HB-A6 for guix-patches@gnu.org; Thu, 24 Apr 2025 20:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78050] [PATCH 3/5] build-system: waf: Improve waf-build style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Apr 2025 00:06: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.17455395128539 (code B ref 78050); Fri, 25 Apr 2025 00:06:02 +0000 Received: (at 78050) by debbugs.gnu.org; 25 Apr 2025 00:05:12 +0000 Received: from localhost ([127.0.0.1]:42818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u86Z5-0002Db-Pd for submit@debbugs.gnu.org; Thu, 24 Apr 2025 20:05:12 -0400 Received: from 10.mo563.mail-out.ovh.net ([46.105.78.6]:38195) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u86Z1-000291-Md for 78050@debbugs.gnu.org; Thu, 24 Apr 2025 20:05:08 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZkClQ13PMz1cwH; Fri, 25 Apr 2025 00:05:06 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78050@debbugs.gnu.org>; Fri, 25 Apr 2025 00:05:06 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.178.252]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZkClQ03qbz7wVj; Fri, 25 Apr 2025 00:05:06 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.7]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 8C1C4BA3F6F; Fri, 25 Apr 2025 00:05:05 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-107S001d605ec5c-1638-4f5e-85e9-dfa2c9c76e6a, 0A0AE3EC9A8D3E829919296CBA8C7C69D15B3FB7) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Fri, 25 Apr 2025 02:04:48 +0200 Message-ID: <20250425000456.14363-3-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: 15110139703483032290 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvhedtkeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdehtdesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=o2kx6R0mL/RPKzMP6ERUAHyKQ6k0KytLNQsyh4NWXU0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745539506; v=1; b=xZ7iRVJmA4dw6cNZTanZZWGmIphHtWY3Qmudo3VBArJ/Lxyw6kklVQ9ruovRW2VToP5f2tf4 aqEPotVt8hed7LzrUn4pMrfdIl7ZVR6+i6z4lwq4PlbgSx9eL99vW9rI/2eMoiPVuXXxFbXymmi ArsDJx1DNc3ekiGkjbwD2/lTe6DaYpBPq8fM8K793zHbVBlmFWUvNW2vn8bCfLRpgkH4rRxKfJr wTkpf9/vgIrvDkPJoDLWCjeN9ruy1UTdJW/FvPomjzkGCvlcy7kcSKbhzKTScDDrfhgW6uFk8tW 3HqwHpkjXAW8Kyk3gIfW+gSGlMC5/oxBBz7yrxrNy/Fsg== 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/waf.scm (waf-build): Use with-imported-modules around the waf-build builder gexp. Change-Id: Id242046eb4bfef90dba60d7c3b1b68597ddf502e --- guix/build-system/waf.scm | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm index 5f246155141..4ca293ffd89 100644 --- a/guix/build-system/waf.scm +++ b/guix/build-system/waf.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -86,22 +87,23 @@ (define* (waf-build name inputs "Build SOURCE with INPUTS. This assumes that SOURCE provides a 'waf' file as its build system." (define build - #~(begin - (use-modules #$@(sexp->gexp modules)) + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) - #$(with-build-variables inputs outputs - #~(waf-build #:name #$name - #:source #+source - #:configure-flags #$configure-flags - #:system #$system - #:test-target #$test-target - #:tests? #$tests? - #:phases #$phases - #:outputs %outputs - #:search-paths '#$(sexp->gexp - (map search-path-specification->sexp - search-paths)) - #:inputs %build-inputs)))) + #$(with-build-variables inputs outputs + #~(waf-build #:name #$name + #:source #+source + #:configure-flags #$configure-flags + #:system #$system + #:test-target #$test-target + #:tests? #$tests? + #: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)))