[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
75/163: gnu: roguebox-adventures: Wrap with the new Guix PYTHONPATH.
From: |
guix-commits |
Subject: |
75/163: gnu: roguebox-adventures: Wrap with the new Guix PYTHONPATH. |
Date: |
Mon, 25 Jan 2021 02:01:35 -0500 (EST) |
apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.
commit 71b1cb64c6e504802efc7d7eddecedad6628afb4
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 21:05:26 2021 -0500
gnu: roguebox-adventures: Wrap with the new Guix PYTHONPATH.
* gnu/packages/games.scm (roguebox-adventures):
[phases]: Remove trailing #t.
{install}: Wrap with the new Guix PYTHONPATH.
---
gnu/packages/games.scm | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 1f9d784..5055395 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -56,6 +56,7 @@
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2020 Lu hux <luhux@outlook.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2067,12 +2068,12 @@ utilizing the art assets from the @code{SuperTux}
project.")
(substitute* "main.py"
(("home_save = False") "home_save = True")
(("'icon_small.png'")
- (string-append "'" data "/icon_small.png'"))))
- #t))
+ (string-append "'" data "/icon_small.png'"))))))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
+ (pythonpath (guix-pythonpath inputs))
(roguebox-adventures
(string-append bin "/roguebox-adventures"))
(data (string-append
@@ -2100,13 +2101,15 @@ utilizing the art assets from the @code{SuperTux}
project.")
(lambda (p)
(format p "\
#!~a
-export PYTHONPATH=~a/LIB:~a
+export ~a=~a/LIB:~a
exec -a \"~a\" ~a \"$@\"\n"
- (which "bash") data (getenv "PYTHONPATH")
+ (which "bash")
+ pythonpath
+ data
+ (getenv pythonpath)
(which "python3")
(string-append lib "/main.py"))))
- (chmod roguebox-adventures #o555))
- #t)))))
+ (chmod roguebox-adventures #o555)))))))
(native-inputs
`(("unzip" ,unzip)))
(inputs
@@ -2144,8 +2147,7 @@ can be explored and changed freely.")
;; Remove non-free (non-commercial) font.
(snippet
`(begin
- (for-each delete-file (find-files "data/fonts" "."))
- #t))))
+ (for-each delete-file (find-files "data/fonts" "."))))))
(build-system python-build-system)
(arguments
`(#:tests? #f ;no test
@@ -2153,9 +2155,10 @@ can be explored and changed freely.")
(modify-phases %standard-phases
(delete 'build) ;pure Python
(replace 'install ;no install script
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
+ (pythonpath (guix-pythonpath inputs))
(share (string-append out "/share"))
(applications (string-append share "/applications"))
(data (string-append share "/seahorse-adventures")))
@@ -2176,9 +2179,12 @@ can be explored and changed freely.")
(lambda (p)
(format p
"#!~a~@
- export PYTHONPATH=~a:~a~@
+ export ~a=~a:~a~@
exec -a \"~a\" ~a \"$@\"~%"
- (which "bash") data (getenv "PYTHONPATH")
+ (which "bash")
+ pythonpath
+ data
+ (getenv pythonpath)
(which "python3")
(string-append data "/run_game.py"))))
(chmod executable #o555))
@@ -2202,8 +2208,7 @@ can be explored and changed freely.")
(copy-file
(string-append "icon" size ".png")
(string-append dir "/searhorse-adventures.png"))))
- '("32" "64" "128")))
- #t))
+ '("32" "64" "128")))))
(add-after 'install 'unbundle-fonts
;; Unbundle Bitstream Vera font and replace deleted one.
(lambda* (#:key outputs inputs #:allow-other-keys)
@@ -2220,8 +2225,7 @@ can be explored and changed freely.")
'("default" "gray")))
(symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
(substitute* (string-append data "/lib/main.py")
- (("f_scale = 0.35") "f_scale = 0.47")))
- #t)))))
+ (("f_scale = 0.35") "f_scale = 0.47"))))))))
(inputs
`(("font-bitstream-vera" ,font-bitstream-vera)
("python-pygame" ,python-pygame)))
- 61/163: gnu: python-django-appconf: Do not alter PYTHONPATH., (continued)
- 61/163: gnu: python-django-appconf: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 40/163: gnu: manuskript: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 72/163: gnu: python-hyperkitty: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 79/163: gnu: gdk-pixbuf: Update to 2.42.2., guix-commits, 2021/01/25
- 142/163: gnu: python-libcst: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 140/163: gnu: python-tblib: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 158/163: gnu: python-jsonpickle: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 159/163: gnu: python-databricks-cli: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 161/163: gnu: python-flask-wtf: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 49/163: gnu: cups: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 75/163: gnu: roguebox-adventures: Wrap with the new Guix PYTHONPATH.,
guix-commits <=
- 89/163: gnu: python-fenics-fiat: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 105/163: gnu: gnome-music: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 93/163: gnu: byobu: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 99/163: gnu: pagekit: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 98/163: gnu: blueman: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 91/163: gnu: python-fenics-ffc: Do not alter PYTHONPATH., guix-commits, 2021/01/25
- 95/163: gnu: rapid-photo-downloader: Wrap with the new Guix PYTHONPATH., guix-commits, 2021/01/25
- 129/163: gnu: python-jsonschema: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 128/163: gnu: python-click: Do not set PYTHONPATH., guix-commits, 2021/01/25
- 139/163: gnu: python-moto: Do not set PYTHONPATH., guix-commits, 2021/01/25