From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CDrkLmk+fWBjKwAAgWs5BA (envelope-from ) for ; Mon, 19 Apr 2021 10:25:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OLjCKWk+fWAMSQAAB5/wlQ (envelope-from ) for ; Mon, 19 Apr 2021 08:25:13 +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 4D93321F32 for ; Mon, 19 Apr 2021 10:25:13 +0200 (CEST) Received: from localhost ([::1]:43260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYPDU-0001Jl-DG for larch@yhetil.org; Mon, 19 Apr 2021 04:25:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYPDK-0001J0-L3 for guix-patches@gnu.org; Mon, 19 Apr 2021 04:25:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYPDK-0007eP-Du for guix-patches@gnu.org; Mon, 19 Apr 2021 04:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYPDK-0001VR-Ao for guix-patches@gnu.org; Mon, 19 Apr 2021 04:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47824] [PATCH 3/3] gnu: tsukundere: Update to 0.3.0. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Apr 2021 08:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47824 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 47824@debbugs.gnu.org Received: via spool by 47824-submit@debbugs.gnu.org id=B47824.16188206835758 (code B ref 47824); Mon, 19 Apr 2021 08:25:02 +0000 Received: (at 47824) by debbugs.gnu.org; 19 Apr 2021 08:24:43 +0000 Received: from localhost ([127.0.0.1]:48360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYPD1-0001Un-6R for submit@debbugs.gnu.org; Mon, 19 Apr 2021 04:24:43 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:10659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYPCz-0001Uf-CJ for 47824@debbugs.gnu.org; Mon, 19 Apr 2021 04:24:42 -0400 Received: from nijino.local (194-96-9-9.adsl.highway.telekom.at [194.96.9.9]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FP0Gt1852z1LLyL; Mon, 19 Apr 2021 10:24:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4FP0Gt1852z1LLyL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1618820678; bh=9qvXLKs9d+ArS5GJyKA/Fs93NdyczZdDKmf1PU4Wb08=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=kUQSfoMRE0UXLjPJMDRfERB4JnHA336WGwx9oiAhKhY0JKr84EPk5KeNjUuCuhRwP t+hqSNmhulEXeDac9Bg+0IDdNlVTgUFgdZhyzCfelP7+/BBNmTvLWuNpBMbNaC5tRx WHlpnCk8WyuU8b/tD2crJQguoJ3ikHSlCtBVimYg= Message-ID: From: Leo Prikler Date: Mon, 19 Apr 2021 10:24:37 +0200 In-Reply-To: References: <20210416110723.9938-1-leo.prikler@student.tugraz.at> <20210416110723.9938-3-leo.prikler@student.tugraz.at> 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=1618820713; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=9qvXLKs9d+ArS5GJyKA/Fs93NdyczZdDKmf1PU4Wb08=; b=N/hNbdzlAoMQyGjnmmnRuEF6uM6BNua2yPMmOM4bmElwytGC0Bm8G+p6rmUQ7t7I+niApW 7YXSJj8/H4DovjnHvZkMmqaP9/nfDo64oVGv5MfihhkqE2MONfnvTJGY7Jo6XBQzcaD77R Pl7meeWTlBBLDBOfv9fkLCuC6WSjbiMQxW+21IwOQ+1MUZff0wdt0yUqm1DKTPP15LUl4H iJzUrfMh6/l3bWeirkClvOPA13Xh81zZuEEwjsSCK2CqgSmdHpn04FDS5A8zaQ3/ohDZwK 7uZztGdoRcv9jM2UN/39Vi0909wuOHryX0itCBsvwcfE8MTTM82QA318pFxzlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618820713; a=rsa-sha256; cv=none; b=e0UAetGFXKHnDhR8plvDyD/+mVeaqxl6vzFhoJ79I0y2lEyzTZPeS//Xwr2FRMMK3wu4E3 BqaEgU567OdEdeDreX5O2Fzo8KeTF0RxU2DRo0LanB5XfjLGDeuLROipCwr/Oh61tuc3/Z GkAuqpTJG+sDLak7kisluJfvTwtsmNvpkWAiIoidJSREk03R1Psqmc9iIUPedxcMnIaXop rPxiGRXdZMeLEk4uaVPxLEocsAhSIlfKEtOUeryyhqe78fP8t/pVLuxY10XS946T+zmIt0 HKbDkduITUiq+d9R/qMFrwauMciLjFOa7t+JNtnht3PU34hwLDrDPHq83HC/Dw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=kUQSfoMR; 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.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=kUQSfoMR; 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: 4D93321F32 X-Spam-Score: -1.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7L4gELrzV9yu Am Montag, den 19.04.2021, 10:56 +0300 schrieb Efraim Flashner: > On Fri, Apr 16, 2021 at 01:07:23PM +0200, Leo Prikler wrote: > > * gnu/packages/game-development.scm (tsukundere): Update to 0.3.0. > > [patch-command]: Patch path to guile. Construct load paths > > directly from > > inputs. > > [propagated-inputs]: Remove. > > [inputs]: Add guile (as guile-runtime) and guile-sdl2. > > --- > > gnu/packages/game-development.scm | 45 +++++++++++++++++++------ > > ------ > > 1 file changed, 28 insertions(+), 17 deletions(-) > > > > diff --git a/gnu/packages/game-development.scm b/gnu/packages/game- > > development.scm > > index 0d4855d275..98ef88971a 100644 > > --- a/gnu/packages/game-development.scm > > +++ b/gnu/packages/game-development.scm > > @@ -493,7 +493,7 @@ clone.") > > (define-public tsukundere > > (package > > (name "tsukundere") > > - (version "0.2.3") > > + (version "0.3.0") > > (source (origin > > (method git-fetch) > > (uri (git-reference > > @@ -502,10 +502,11 @@ clone.") > > (file-name (git-file-name name version)) > > (sha256 > > (base32 > > - "05ckds2df810441wfavllx9lsw5jsc9h3nb7m31df01nsj56a > > zdw")))) > > + "06jiaylbnx8khicsaq2gwnd8wspjhjymbb5z6x5445krklk0j > > x18")))) > > (build-system gnu-build-system) > > (arguments > > - `(#:modules (((guix build guile-build-system) > > + `(#:modules ((srfi srfi-1) > > + ((guix build guile-build-system) > > #:select (target-guile-effective-version)) > > ,@%gnu-build-system-modules) > > #:imported-modules ((guix build guile-build-system) > > @@ -513,22 +514,31 @@ clone.") > > #:phases > > (modify-phases %standard-phases > > (add-after 'unpack 'patch-command > > - (lambda* (#:key outputs #:allow-other-keys) > > - (let* ((out (assoc-ref outputs "out")) > > - (version (target-guile-effective-version)) > > - (scm (string-append out "/share/guile/site/" > > - version)) > > - (go (string-append out "/lib/guile/" > > - version "/site-ccache"))) > > - > > + (lambda* (#:key inputs outputs #:allow-other-keys) > > + (let* ((version (target-guile-effective-version)) > > I see that the code before uses version but I wouldn't overwrite the > version variable which normally points to the package's version. I > suggest guile-version or something similar. Good point. Since it's only used to construct scm and go (now ccache), I've decided to inline (target-guile-effective-version). > > + (scm (lambda (in) > > + (string-append in "/share/guile/site/" > > + version))) > > + (go (lambda (in) > > Perhaps go-cache would be more descriptive > (I see that it was also 'go' before) Decided on ccache, YMMV. > > + (string-append in "/lib/guile/" version > > + "/site-ccache"))) > > + (pkgs > > + (cons > > + (assoc-ref outputs "out") > > + (filter-map > > + (lambda (input) > > + (and (string-prefix? "guile-" (car > > input)) (cdr input))) > > I'm not in love with this, I personally find it a bit hard to parse. > I'm > not really sure what the (cdr input) is there for. (without testing > it > myself) I'd suggest borrowing the filter-map code from guile-studio > in > (gnu packages guile-xyz) where it searches for emacs packages. I wanted to avoid needing ice-9 match, but you're right, that looks better. > > + inputs)))) > > (substitute* "bin/tsukundere" > > - (("exec guile .*" all) > > + (("exec guile (.*)" _ args) > > (string-append > > (format #f "export GUILE_LOAD_PATH=~@?~%" > > - "\"~a:~a\"" scm (getenv > > "GUILE_LOAD_PATH")) > > + "\"~{~a~^:~}\"" (map scm pkgs)) > > (format #f "export > > GUILE_LOAD_COMPILED_PATH=~@?~%" > > - "\"~a:~a\"" go (getenv > > "GUILE_LOAD_COMPILED_PATH")) > > - all))) > > + "\"~{~a~^:~}\"" (map go pkgs)) > > + "exec " > > + (assoc-ref inputs "guile-runtime") > > + "/bin/guile " args))) > > #t)))))) > > (Again without really testing it) Perhaps it would be better to > remove > this whole phase and to replace it with wrap-script. > > Actually, forget all of that. There's a comment in (guix build utils) > saying that Guile scripts are not supported. That's why I'm implementing my custom wrapper here. I'm not sure if this is a general solution for guile scripts, but for those, that use the "exec guile" trick, the phase I wrote should act similar to wrap- program without needing to construct a wrapper script. Regards, Leo