guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

69/163: gnu: renpy: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 69/163: gnu: renpy: Wrap with the new Guix PYTHONPATH.
Date: Mon, 25 Jan 2021 02:01:33 -0500 (EST)

apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.

commit 4150c73b848b62843a64c368b9b4b2c8b070819c
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 00:59:57 2021 -0500

    gnu: renpy: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/game-development.scm (renpy): Delete trailing #t.
    [phases]{wrap}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/game-development.scm | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/game-development.scm 
b/gnu/packages/game-development.scm
index fa7875d..2ccd46c 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1229,27 +1230,23 @@ modules of Ren'py.")
                ;; Projects are still created in the usual style, so we need
                ;; to adjust the path.
                (("cmd.append\\(self.path\\)")
-                "cmd.append(self.path + \"/game\")"))
-             #t))
+                "cmd.append(self.path + \"/game\")"))))
          (add-after 'unpack 'drop-game-from-paths
            (lambda _
              (substitute* (list "launcher/game/gui7.rpy"
                                 "launcher/game/gui7/images.py")
-               ((", \"game\",") ","))
-             #t))
+               ((", \"game\",") ","))))
          (add-before 'build 'start-xserver
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((xorg-server (assoc-ref inputs "xorg-server")))
                (setenv "HOME" (getcwd))
                (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
-               (setenv "DISPLAY" ":1")
-               #t)))
+               (setenv "DISPLAY" ":1"))))
          (replace 'build
            (lambda _
              (invoke "python" "renpy.py" "launcher" "quit")
              (invoke "python" "renpy.py" "the_question" "quit")
-             (invoke "python" "renpy.py" "tutorial" "quit")
-             #t))
+             (invoke "python" "renpy.py" "tutorial" "quit")))
          (replace 'install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Here we install our custom renpy program.
@@ -1339,8 +1336,7 @@ if __name__ == \"__main__\":
     main()
 "
                            (string-append out "/share/renpy"))))
-               (chmod bin/renpy #o755)
-               #t)))
+               (chmod bin/renpy #o755))))
 
          (add-after 'install 'install-games
            (lambda* (#:key outputs #:allow-other-keys)
@@ -1371,14 +1367,13 @@ if __name__ == \"__main__\":
                                  #:name "the-question")
 
              (install-renpy-game #:output (assoc-ref outputs "tutorial")
-                                 #:game "tutorial")
-             #t))
+                                 #:game "tutorial")))
          (replace 'wrap
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (wrap-program (string-append (assoc-ref outputs "out")
-                                          "/bin/renpy")
-               `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
-             #t)))))
+             (let ((pythonpath (guix-pythonpath inputs)))
+               (wrap-program (string-append (assoc-ref outputs "out")
+                                            "/bin/renpy")
+                 `(,pythonpath (,(getenv pythonpath))))))))))
     (inputs
      `(("python2-tkinter" ,python-2 "tk")
        ("python2-pygame" ,python2-pygame-sdl2)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]