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 ePY9JvPTC2FAmgAAgWs5BA (envelope-from ) for ; Thu, 05 Aug 2021 14:05:07 +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 CAUmIvPTC2HoWQAA1q6Kng (envelope-from ) for ; Thu, 05 Aug 2021 12:05:07 +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 4EFF03D03 for ; Thu, 5 Aug 2021 14:05:07 +0200 (CEST) Received: from localhost ([::1]:52698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBc7V-0004bB-Pg for larch@yhetil.org; Thu, 05 Aug 2021 08:05:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBc7S-0004ax-5l for guix-patches@gnu.org; Thu, 05 Aug 2021 08:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBc7R-00005e-VF for guix-patches@gnu.org; Thu, 05 Aug 2021 08:05:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBc7R-0003gR-PJ for guix-patches@gnu.org; Thu, 05 Aug 2021 08:05: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 12:05: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.162816505414105 (code B ref 49828); Thu, 05 Aug 2021 12:05:01 +0000 Received: (at 49828) by debbugs.gnu.org; 5 Aug 2021 12:04:14 +0000 Received: from localhost ([127.0.0.1]:46117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBc6g-0003fR-1P for submit@debbugs.gnu.org; Thu, 05 Aug 2021 08:04:14 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:44129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBc6e-0003fH-0N for 49828@debbugs.gnu.org; Thu, 05 Aug 2021 08:04:13 -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 4GgS2K018gz1DH9P; Thu, 5 Aug 2021 14:04:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GgS2K018gz1DH9P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1628165049; bh=cdl1Uv7SMseSITfFEd3yF1LZNC2euuH5illtAH2rCMc=; h=Subject:From:To:Date:In-Reply-To:References:From; b=naDDzqlPWzBLsRxQnwKfaJoA6V3r4AlEJCB0wfaWH3XJ3X8iiQc3fkmKCGajYLZj7 aPGu1kMyqbss8dFlr+DNWuPuZI1u3VpiwGfTmnsvvB6pxX5WXDHF2ivwLL9y7/UiO5 TZ4xClbejqeDx2wSbFOQxpNT58wDezzUkzcQBz+Y= Message-ID: <2a49c566e1ecc280db79bcda1e893547216dd83a.camel@student.tugraz.at> From: Leo Prikler Date: Thu, 05 Aug 2021 14:04:07 +0200 In-Reply-To: <7680df67d8be80c1d55771407256c28b76e0d836.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> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.116 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=1628165107; 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=cdl1Uv7SMseSITfFEd3yF1LZNC2euuH5illtAH2rCMc=; b=KaAH7ayvF7WDB7DgJ97vfHSo1SQe5f6OPi8+wzWbunVZeqPfKQhbYYk35GaH0EUqfDE5fV uQgcwqjEsRnu8Xbb5B4qXQ/GmN/vNOTdyWSHLbXEwaHtHXznN6e8pdqHe6i5tAUNVxf832 gYoIgtK4dOSZUiH2qqCcJoX0d/ZAESq+1lX3rscx39XOPEXu/1A5fzfssmbogR489Pvmcz eeM5W6rtMNFZtJmvexwRINQsgiMT7z/oEV7fCuOtZYWObSEsHL5RpICpwu7FnfaK50PUOl nxGR5xUDrUdmlt8JbRbYvuQXzAr6Krgfc/ZNH1LiMTUvIT2aoKILp7xKXV9ttg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628165107; a=rsa-sha256; cv=none; b=u2nDfO6J2WHRYrmbcN/WA7L9Aji8RXB1MMezxJ++XNtwXpLfJ27BBEePQn6UqVnpGhHPEg dDOmS5o3M650eYSUf4W/kPwLJQkiNsH0IOn0nyhAsgwDHh7xdlvLbjhNojDxunaM0nY0oa Lkt5Ztt+mQcrFRmRdDdVTB/ZTQyxkwpOeu8SWCX8LQmht3Ps+S0IeZ8smgzikuL5xw4lpH 2B1FgIV9r0aNKWesqjLGZP5cQWeFZkAsOfdv5yjOsauJnE44zHCRYX/I2gT9SPKA1jiyUJ vjByDEA+xWGqtlMdmsKkKOqHrnj7oYOHkdLISWMl8IQdkwGB2OmNsdJLNqoJSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=naDDzqlP; 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=naDDzqlP; 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: 4EFF03D03 X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: FTs6RJ3xzo6T Hi, Am Donnerstag, den 05.08.2021, 13:01 +0200 schrieb Maxime Devos: > Hi, > > The attached patch squashes "PATCH 04" and "PATCH 05" together > and extends the build system. It now has an install plan only > installing > what's necessary (Lua code, PNG images, some configuration files > ...), > a 'check' build phase verifying Minetest can actually load the mod, > and a 'minimise-png' phase minimising PNG images. > > The mod name for ‘(("." "share/minetest/mods/the-mod-name"))’ can now > be determined exactly in most cases (Minetest doesn't really care but > the directory name can appear in the GUI in some cases). > > Greetings, > Maxime. > +mods, which consists of copying lua code, images and other resources > to s/lua/Lua/ :) > +(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. > +(define png-file? > + ((@@ (guix build utils) file-header-match) %png-magic-bytes)) Likewise import (guix build utils) directly. > +(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. 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. Otherwise looks pretty good to me.