From patchwork Fri Jun 17 14:45:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 40093 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 1E7A627BBEA; Fri, 17 Jun 2022 16:17:31 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable 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 C788527BBE9 for ; Fri, 17 Jun 2022 16:17:30 +0100 (BST) Received: from localhost ([::1]:34264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2Diz-0006tj-WC for patchwork@mira.cbaines.net; Fri, 17 Jun 2022 11:17:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2DiZ-00067E-QG for guix-patches@gnu.org; Fri, 17 Jun 2022 11:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2DiZ-0003ZA-HL for guix-patches@gnu.org; Fri, 17 Jun 2022 11:17:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2DiZ-0002O7-DF for guix-patches@gnu.org; Fri, 17 Jun 2022 11:17:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55424] [PATCH v2 6/6] guix: Modernize renpy-build-system. References: <20220515044412.6697-1-maxim.cournoyer@gmail.com> In-Reply-To: <20220515044412.6697-1-maxim.cournoyer@gmail.com> Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Jun 2022 15:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55424 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 55424@debbugs.gnu.org Received: via spool by 55424-submit@debbugs.gnu.org id=B55424.16554790109116 (code B ref 55424); Fri, 17 Jun 2022 15:17:03 +0000 Received: (at 55424) by debbugs.gnu.org; 17 Jun 2022 15:16:50 +0000 Received: from localhost ([127.0.0.1]:46673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2DiL-0002Mt-L0 for submit@debbugs.gnu.org; Fri, 17 Jun 2022 11:16:49 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:44731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2DiG-0002Ls-94 for 55424@debbugs.gnu.org; Fri, 17 Jun 2022 11:16:45 -0400 Received: by mail-ed1-f66.google.com with SMTP id b8so6574675edj.11 for <55424@debbugs.gnu.org>; Fri, 17 Jun 2022 08:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:cc:content-transfer-encoding:message-id :mime-version; bh=iUA4AzB79bJSoaQNHqYsPI8nRlGT5Wmg3DtY477vH9s=; b=l5KrCjS6XFbopAVP3cX+WR2HQ6rkvoFjDMF3gOEAPMb0wUhV5h3/X2VPCFxzRAy0UC RIA1k1GACFV+6Sqq4YtO7AF2xytz8oQH5RBrbJMDfZ9TDoIOyi/1Hy6CU2zyJSUtuKwR 6x0e2rPWhbzIbRoB5PuIW24DZ7YRg2XudFLQ4UbdXOMcl/gczP8AzVtMcMDIdYBweg2X KU1sGSwz28gYNQLkI5ly7giFgpo4Y1MpZhQ5JphzTSDWsZMpDZfSQZELiFbUbYHuaHmG gQEo4YDotaj3jPxvBamkoBBlpOOQnEEACbGNN7DJgUYogLHuUNHxZ67d0IxYxdRzmp1k +Hxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:cc :content-transfer-encoding:message-id:mime-version; bh=iUA4AzB79bJSoaQNHqYsPI8nRlGT5Wmg3DtY477vH9s=; b=58EkPtsB6YA81vwmzVe80+KwfXU+/iKaqQgaRlTdU+IVKO7+Xp/R7MhPwQ2ylS7zTF ZIBDe8FTZ0gemGR5FF9+EQ6QWeF/hIfKDPLEOpErjkMKUCDWJlfNPfWQXtXjrGIhjKAZ QXWRzstsFjo8xA8eDTxzLIJ1bhFvipWUOJuvdhpryrjrbmDjbCHvBqJoMvZiRkj3ubz8 ec3KT1QMSQNyt3szFugWv9lv5Q0GH4bCDoJS/TQdolbLt0iGXRNvGrmDNGdr1BeOc9tE GK1rD4LhIo1XOlhIB3FjFDU7sllpr+h8c+U/D7CUpcHzUt2hAT4UHksfV+WHNlc0q7Ma ml9Q== X-Gm-Message-State: AJIora/FMLwBhCf4xdctO6Z/7A9aO6cZjrQGuSFBqMICf9xtuzuF8vGt TSFiXaf1lzUW6An1p2yrOa0= X-Google-Smtp-Source: AGRyM1tO7viGbjl5AnAsHMOH2TS4NlXbUhhO4UBvtSld5Ov+Scxs5FlB8NlbnrlxIcImSP1OjdaVYA== X-Received: by 2002:a05:6402:4144:b0:431:6ef0:bef7 with SMTP id x4-20020a056402414400b004316ef0bef7mr13315930eda.151.1655478998755; Fri, 17 Jun 2022 08:16:38 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id u20-20020aa7d554000000b0042a2d9af0f8sm3801083edr.79.2022.06.17.08.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 08:16:38 -0700 (PDT) From: Liliana Marie Prikler Date: Fri, 17 Jun 2022 16:45:13 +0200 Message-ID: <6ac83c4c9c21e361adca50ba2f721f56c6103628.camel@gmail.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/build-system/renpy.scm (build): Drop trailing #t. (install, install-desktop-file): Likewise. Also add inputs and use search-input-file for /bin/sh and /bin/renpy. --- guix/build/renpy-build-system.scm | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/guix/build/renpy-build-system.scm b/guix/build/renpy-build-system.scm index e4a88456be..7c15d52f19 100644 --- a/guix/build/renpy-build-system.scm +++ b/guix/build/renpy-build-system.scm @@ -37,10 +37,9 @@ (define* (build #:key game #:allow-other-keys) game ;; should be "compile", but renpy wants to compile itself really ;; badly if we do - "quit") - #t) + "quit")) -(define* (install #:key outputs game (output "out") #:allow-other-keys) +(define* (install #:key inputs outputs game (output "out") #:allow-other-keys) (let* ((out (assoc-ref outputs output)) (json-dump (call-with-input-file (string-append game "/renpy-build.json") @@ -58,13 +57,12 @@ (define* (install #:key outputs game (output "out") #:allow-other-keys) (call-with-output-file launcher (lambda (port) (format port "#!~a~%~a ~s \"$@\"" - (which "bash") - (which "renpy") + (search-input-file inputs "/bin/sh") + (search-input-file inputs "/bin/renpy") data))) - (chmod launcher #o755))) - #t) + (chmod launcher #o755)))) -(define* (install-desktop-file #:key outputs game (output "out") +(define* (install-desktop-file #:key inputs outputs game (output "out") #:allow-other-keys) (let* ((out (assoc-ref outputs output)) (json-dump (call-with-input-file (string-append game @@ -78,10 +76,9 @@ (define* (install-desktop-file #:key outputs game (output "out") #:name (assoc-ref json-dump "name") #:generic-name (assoc-ref build "display_name") #:exec (format #f "~a ~s" - (which "renpy") + (search-input-file inputs "/bin/renpy") (string-append out "/share/renpy/" directory-name)) - #:categories '("Game" "Visual Novel"))) - #t) + #:categories '("Game" "Visual Novel")))) (define %standard-phases (modify-phases gnu:%standard-phases