From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AIZaEPDqC2EawQAAgWs5BA (envelope-from ) for ; Thu, 05 Aug 2021 15:43:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oFA/DPDqC2HnGgAA1q6Kng (envelope-from ) for ; Thu, 05 Aug 2021 13:43:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D87A55E1E for ; Thu, 5 Aug 2021 15:43:11 +0200 (CEST) Received: from localhost ([::1]:50916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBdeQ-0008LW-VY for larch@yhetil.org; Thu, 05 Aug 2021 09:43:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBdeI-0008Iq-7h for guix-patches@gnu.org; Thu, 05 Aug 2021 09:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBdeI-0006XX-1I for guix-patches@gnu.org; Thu, 05 Aug 2021 09:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBdeH-0005y4-SB for guix-patches@gnu.org; Thu, 05 Aug 2021 09:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49828] [PATCH 05/20] build-system: minetest: Don't retain references to "bash-minimal". Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49828 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 49828@debbugs.gnu.org Received: via spool by 49828-submit@debbugs.gnu.org id=B49828.162817097822931 (code B ref 49828); Thu, 05 Aug 2021 13:43:01 +0000 Received: (at 49828) by debbugs.gnu.org; 5 Aug 2021 13:42:58 +0000 Received: from localhost ([127.0.0.1]:46214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBdeE-0005xn-57 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 09:42:58 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:35238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBdeA-0005xb-L8 for 49828@debbugs.gnu.org; Thu, 05 Aug 2021 09:42:56 -0400 Received: from nijino.local (194-118-35-216.adsl.highway.telekom.at [194.118.35.216]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GgVDB49DKz3xV2; Thu, 5 Aug 2021 15:42:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1628170970; bh=Qatwmi1I+Jbf3g2AzMEGdfTLQuvETTKHjIs8aKJWh+0=; h=Subject:From:To:Date:In-Reply-To:References; b=Pe1AmJD0+gAiu5b6GvMXT0fomRR2bm2GhcRFJBEyP/X6htIAs8R3vl72A8m6ZpiYJ p+orDuDAbo0awr5IoctiZ2TvAlsCPCm+OPSnayIWy6WAByDn786w5b0tPY7UQcJCMM tTo8iSnJey1DNU32jIajNGbSPeHcyA9v1zxHPg1s= Message-ID: <1a63353207ea0cbccaaf3138d42148fe5a98da62.camel@student.tugraz.at> From: Leo Prikler Date: Thu, 05 Aug 2021 15:42:49 +0200 In-Reply-To: <8a8699af5e530cff4bab22aad4e5fa1862ebffc7.camel@telenet.be> References: <20210802155019.6122-1-maximedevos@telenet.be> <20210802155019.6122-5-maximedevos@telenet.be> <60c5062a7debff22cee27198c2548605fd7441e0.camel@student.tugraz.at> <265c85f914757066aee6b6933ba58bf1abd2bc84.camel@telenet.be> <8d13a1057f368f47eef8da538c554a379892cacc.camel@student.tugraz.at> <7680df67d8be80c1d55771407256c28b76e0d836.camel@telenet.be> <2a49c566e1ecc280db79bcda1e893547216dd83a.camel@student.tugraz.at> <8a8699af5e530cff4bab22aad4e5fa1862ebffc7.camel@telenet.be> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628170992; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Qatwmi1I+Jbf3g2AzMEGdfTLQuvETTKHjIs8aKJWh+0=; b=NPex8Z3BCbhY6o2fI/oUYTq3PQgDKjYFchfnGKQG+1JGCdCBaKFI+ts7hpBvhkAd5wSMkx TrsI+yLkG67MgQeONY0VAm2XFd4rlgdaKFfsNDaKp4QZkIllfrGGvK1UJaivjuUwHmzVf6 335X8YJUVSwtAgmGgAD24whHXnlLcPsXrlzgvQXlGwb4Zpc5IxUPBTXV6sCWni5Dtb+ZLs WIXWfuk6idVzzjQ026kdah11HML8U1rdIiM/M0iK83gD3DxxyUwMVXhFgd9fkymuRwDzCN WXzUrj6RdnpyiTibU7XN4Cip9ZswgFpoyPKE1x9pR7/tUL7iumtWYnwCjDcM4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628170992; a=rsa-sha256; cv=none; b=iUMHydOQyht7ySbH6eWjFpsQfl3TpQbKphenso93isN3RuLzEM0irtkUxBJOKUF8iI4o2j Rf8qHgSjrleMQmC0C7DuQJ+11zaChNl/OQ+Isww139mGvBCYLTucerHItPzNbT0c+RKiti e7zIleo7krSiiBoOKJ3ea1yt1+69emlv6nQKn/wk5WC5/lnEZAfZd2CuZ3p60I5KbbLtRl TuZm4T5XY0RhPiSTT83CXPlZ+OCiPLHFHVMDpUV0BQ3hyux3d8ekV+7FGmmbBgHPDgdhZB +B8K05DqC5JJy3jl1FfJJ2fJtcCzEEgMLmLdT+HzClX+U0lmKkKo/Xu3eB6sDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Pe1AmJD0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Pe1AmJD0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: D87A55E1E X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: dbbF9ACqihlL Am Donnerstag, den 05.08.2021, 15:16 +0200 schrieb Maxime Devos: > [...] > > > +(define* (install #:key inputs #:allow-other-keys #:rest > > > arguments) > > > + (apply (@@ (guix build copy-build-system) install) > > > + #:install-plan (mod-install-plan (apply guess-mod-name > > > arguments)) > > > + arguments)) > > @@ is a code smell, as far as Guix is concerned. Rather import > > copy-build-system with the copy: prefix. > > 'copy-build-system' does not export 'install', so I have to use '@@' > here. > Modifying 'copy-build-system' to export 'install' would presumably > entail > a many rebuilds. I think the thing that's usually done here is fetching through %standard-phases. I.e. (define copy:install (assoc-ref copy-build-system:%standard-phases 'install)) > > > +(define png-file? > > > + ((@@ (guix build utils) file-header-match) %png-magic-bytes)) > > Likewise import (guix build utils) directly. > > Likewise. In that case fine, but make a note to move the variable and procedure over to (guix build utils). > > > +(define (lower-mod name . arguments) > > > + (define lower (build-system-lower gnu-build-system)) > > > + (apply lower > > > + name > > > + #:imported-modules %minetest-build-system-modules > > > + #:modules %default-modules > > > + #:phases '%standard-phases > > > + #:implicit-inputs? #f > > > + ;; Mods are architecture-independent. > > > + #:target #f > > > + ;; Ensure nothing sneaks into the closure. > > > + #:allowed-references '() > > > + (substitute-keyword-arguments arguments > > > + ((#:native-inputs native-inputs '()) > > > + (append native-inputs (standard-minetest- > > > packages)))))) > > This appears a little confusing. On first glance, it does not seem > > to > > allow overriding e.g. #:phases, but on a second look using `apply' > > together with shallowly substituted arguments would enable that. > > I modified the patch to move more things into 'substitute-keyword- > arguments' to reduce confusion. LGTM. > > The > > only thing that's missing imo is that #:implicit-inputs? is not > > honoured for (standard-minetest-packages) -- I think you might want > > to > > rectify that. > > I modified 'lower-mod' to _not_ add 'standard-minetest-packages' to > 'native-inputs' when #:implicit-inputs? is false, though I don't see > why a package definition for a Minetest mod would do that. > > I also found a spellig bug ("to minimisation" -> "to minimise") which > is now fixed. The new lower-mod mostly LGTM, but > + ;; Mods are architecture-independent. > + ((#:target target #f) #f) should be `target' imho. What if the mod e.g. actually builds a shared object and somehow uses Lua's very dynamic FFI to load it? (Even if that's not currently possible, it might be in the future). Setting it to #f by default OTOH sounds very reasonable to me. > btw, I submitted the "MINETEST_MOD_PATH" patch upstream, with your > suggestion for "{std::string(...)}" construction: > ;. Nice, perhaps in 5.5 we will be able to enjoy this out-of-the-box. Greetings