From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cK+7KY0u4GAqHwAAgWs5BA (envelope-from ) for ; Sat, 03 Jul 2021 11:31:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kHKCJY0u4GDKJwAAB5/wlQ (envelope-from ) for ; Sat, 03 Jul 2021 09:31:57 +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 2F8AC18D17 for ; Sat, 3 Jul 2021 11:31:57 +0200 (CEST) Received: from localhost ([::1]:60154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzc0C-0006TC-7U for larch@yhetil.org; Sat, 03 Jul 2021 05:31:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzbzO-0005py-CZ for guix-patches@gnu.org; Sat, 03 Jul 2021 05:31:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzbzL-0005Om-19 for guix-patches@gnu.org; Sat, 03 Jul 2021 05:31:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lzbzK-00057Y-WA for guix-patches@gnu.org; Sat, 03 Jul 2021 05:31:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49329] [PATCH v2 4/5] gnu: renpy: Correct inputs. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Jul 2021 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49329 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49329@debbugs.gnu.org Received: via spool by 49329-submit@debbugs.gnu.org id=B49329.162530463519619 (code B ref 49329); Sat, 03 Jul 2021 09:31:02 +0000 Received: (at 49329) by debbugs.gnu.org; 3 Jul 2021 09:30:35 +0000 Received: from localhost ([127.0.0.1]:37942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzbyt-00056G-5u for submit@debbugs.gnu.org; Sat, 03 Jul 2021 05:30:35 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:43983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzbyf-00055R-Lq for 49329@debbugs.gnu.org; Sat, 03 Jul 2021 05:30:22 -0400 Received: from localhost.localdomain (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GH6B32cVMz1LXt4 for <49329@debbugs.gnu.org>; Sat, 3 Jul 2021 11:30:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GH6B32cVMz1LXt4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1625304619; bh=vrUaaG1fXhNhDOq9hmM/m+xmUmqF0kxH5AbZL969yfY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ik8LiEAgkHk/12gXymifLoOpBePbN/YLHTcv1TsGt5h+ClcBN741/X3mx8didLqFl DjZH91yCbJ4WG00Q8olw4qQTe5NfL/ofvIwFjTlb0F9EIl45Mr9VbdinH/GeoBqJNY qrFxku6eTFJg6no9m1LxVpMhYHum274FM+pGqgdk= From: Leo Prikler Date: Sat, 3 Jul 2021 11:28:42 +0200 Message-Id: <20210703092842.32189-4-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210703092842.32189-1-leo.prikler@student.tugraz.at> References: <20210703092842.32189-1-leo.prikler@student.tugraz.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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.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=1625304717; 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=vrUaaG1fXhNhDOq9hmM/m+xmUmqF0kxH5AbZL969yfY=; b=Y71q94BN9zYwfr/UEBLbMORj4LkdEFA5Jff1kqRgVfBkVkanZSza9EzNGQkBxhSdYaLFgu Xfp+DSmSnZSd7RxdzHOJCjWKd4g/nUI6H2kpLHu5KDFbCGDb0PF2jjeZrE+w5MfB1gyW+N dMMdJ4/pDJEG8E5AZbmp6Ep0eogWnSLcGDWOMF8+sgq6+vXjfd8qElHAThkFfqxBNyrJ8R WFNQkVcKrGHICMqu4y0a0zcqelA0eVWa5RkBhYetUgajDwxQNmjfpBd/mk1s39lZqhS2/F HNiYdTTvLaImMuZ5WKbbQ1eH9Z9wvnWnisXJgsWV7XJPKCC7Qbt4M1xw61svZg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625304717; a=rsa-sha256; cv=none; b=E/71BWbld1TIIOZWZqPkbrYnGO+pbNthJJuaYufFX4tPP/ASjlP+twSWrfW8F7caLaOYH4 /c5AqhxKks/iVPuyCqehpaw/VNl8Nn7IYMJd3iBG0ttsx1xnfWTqrGYn7ZyZONcXQI5Uf8 xan1E3eo9q2FhXjvK7UQprTQ+DvmXllnu+yWSJSpXM+QZfN7g/eVQgvWSjmbKTWcw0UyyT o9TrWTyMKDhEbE2MBeTemNfvmp/JPIA71lRRyCMgHVPUNdtvhNvAcNQvCWzILvZl0PqvlS tcsAQVLQg01wkYKRXsL3wDnpdupL8FPHQtY9jzZ0NjI4HxPQwlyWWZ7qphf5+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Ik8LiEAg; 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: -0.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Ik8LiEAg; 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: 2F8AC18D17 X-Spam-Score: -0.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: F1AvY5BvxRSk * gnu/packages/game-development.scm (renpy)[#:modules]: Add SRFI-1. [#:imported-modules]: Likewise. [#:phases]: Search for ‘python2’ and ‘xdg-open’ in inputs. : Search for ‘xorg-server’ in native-inputs. : Search for ‘python2’ in inputs. : Search for python dependencies in inputs. [inputs]: Add python2, drop python2-pygame (already propagated by python2-renpy). Move xorg-server from here… [native-inputs]: … to here. [propagated-inputs]: Empty. --- gnu/packages/game-development.scm | 54 +++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 7c5d45c412..5d5fa5cf8b 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1266,15 +1266,22 @@ are only used to bootstrap it.") (arguments `(#:tests? #f ; see python2-renpy #:python ,python-2 + #:modules ((srfi srfi-1) + (guix build python-build-system) + (guix build utils)) + #:imported-modules ((srfi srfi-1) ,@%python-build-system-modules) #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-commands - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "launcher/game/choose_directory.rpy" - (("/usr/bin/python") (which "python2"))) + (("/usr/bin/python") + (string-append (assoc-ref inputs "python2") + "/bin/python2"))) (substitute* "launcher/game/front_page.rpy" (("xdg-open") - (which "xdg-open"))) + (string-append (assoc-ref inputs "xdg-utils") + "/bin/xdg-open"))) (substitute* "launcher/game/project.rpy" (("cmd = \\[ executable, \"-EO\", sys.argv\\[0\\] \\]") (string-append "cmd = [ \"" (assoc-ref outputs "out") @@ -1291,8 +1298,9 @@ are only used to bootstrap it.") ((", \"game\",") ",")) #t)) (add-before 'build 'start-xserver - (lambda* (#:key inputs #:allow-other-keys) - (let ((xorg-server (assoc-ref inputs "xorg-server"))) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((xorg-server (assoc-ref (or native-inputs inputs) + "xorg-server"))) (setenv "HOME" (getcwd)) (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) (setenv "DISPLAY" ":1") @@ -1344,7 +1352,8 @@ are only used to bootstrap it.") (call-with-output-file bin/renpy (lambda (port) - (format port "#!~a~%" (which "python2")) + (format port "#!~a/bin/python2~%" + (assoc-ref inputs "python2")) (format port " from __future__ import print_function @@ -1433,15 +1442,32 @@ if __name__ == \"__main__\": #t)) (replace 'wrap (lambda* (#:key inputs outputs #:allow-other-keys) - (wrap-program (string-append (assoc-ref outputs "out") - "/bin/renpy") - `("PYTHONPATH" = (,(getenv "PYTHONPATH")))) - #t))))) + (let ((out (assoc-ref outputs "out")) + (site (string-append "/lib/python" + (python-version + (assoc-ref inputs "python")) + "/site-packages"))) + (wrap-program (string-append out "/bin/renpy") + `("PYTHONPATH" = + (,@(delete-duplicates + (map + (lambda (store-path) + (string-append store-path site)) + (cons (assoc-ref outputs "out") + (map cdr + (filter + (lambda (input) + (string-prefix? "python2" (car input))) + inputs)))))))) + #t)))))) (inputs - `(("python2-tkinter" ,python-2 "tk") - ("python2-pygame" ,python2-pygame-sdl2) - ("python2-renpy" ,python2-renpy) - ("xorg-server" ,xorg-server))) + `(("python2-renpy" ,python2-renpy) + ("python2-tkinter" ,python-2 "tk") + ("python2" ,python-2) ; for ‘fix-commands’ and ‘wrap’ + ("xdg-utils" ,xdg-utils))) + (propagated-inputs '()) + (native-inputs + `(("xorg-server" ,xorg-server-for-tests))) (outputs (list "out" "tutorial" "the-question")) (home-page "https://www.renpy.org/") -- 2.32.0