diff options
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r-- | gnu/packages/games.scm | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 3f909aad4b..9fbfad040e 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2183,9 +2183,9 @@ utilizing the art assets from the @code{SuperTux} project.") (lambda (p) (format p "\ #!~a -export PYTHONPATH=~a/LIB:~a +export GUIX_PYTHONPATH=~a/LIB:~a exec -a \"~a\" ~a \"$@\"\n" - (which "bash") data (getenv "PYTHONPATH") + (which "bash") data (getenv "GUIX_PYTHONPATH") (which "python3") (string-append lib "/main.py")))) (chmod roguebox-adventures #o555)) @@ -2259,9 +2259,9 @@ can be explored and changed freely.") (lambda (p) (format p "#!~a~@ - export PYTHONPATH=~a:~a~@ + export GUIX_PYTHONPATH=~a:~a~@ exec -a \"~a\" ~a \"$@\"~%" - (which "bash") data (getenv "PYTHONPATH") + (which "bash") data (getenv "GUIX_PYTHONPATH") (which "python3") (string-append data "/run_game.py")))) (chmod executable #o555)) @@ -3729,9 +3729,12 @@ Widgets, and allows users to create more.") (build-system cmake-build-system) (arguments `(#:tests? #f ; TODO The test running fails to run some tests. - #:modules ((srfi srfi-1) - (guix build cmake-build-system) - (guix build utils)) + #:imported-modules ,(cons '(guix build python-build-system) + %cmake-build-system-modules) + #:modules ((guix build cmake-build-system) + ((guix build python-build-system) #:select (guix-pythonpath)) + (guix build utils) + (srfi srfi-1)) #:configure-flags (list (string-append "-DOPENALSOFT_INCLUDE_DIR=" @@ -3758,30 +3761,15 @@ Widgets, and allows users to create more.") (delete 'check) (add-after 'install 'check (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (define python-version - (let* ((version (last (string-split - (assoc-ref inputs "python") - #\-))) - (components (string-split version #\.)) - (major+minor (take components 2))) - (string-join major+minor "."))) - (when tests? - ;; Set PYTHONPATH so that python finds the installed modules. - (setenv "PYTHONPATH" - (string-append (getenv "PYTHONPATH") ":" - (assoc-ref outputs "out") - "/lib/python" - python-version - "/site-packages")) + (add-installed-pythonpath inputs outputs) ;; The tests require an X server. (system "Xvfb :1 &") (setenv "DISPLAY" ":1") (setenv "XDG_RUNTIME_DIR" "/tmp") ;; Run tests (chdir ,(string-append "../" name "-" version)) - (invoke "python3" "run_tests.py" "-a")) - #t))))) + (invoke "python3" "run_tests.py" "-a"))))))) (inputs `(("sdl2" ,sdl2) ("sdl2-image" ,sdl2-image) @@ -7084,7 +7072,7 @@ some graphical niceities, and numerous bug-fixes and other improvements.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("curl" ,curl-minimal) + `(("curl" ,curl) ("libvorbis" ,libvorbis) ("mesa" ,mesa) ("openal" ,openal) @@ -10398,7 +10386,7 @@ This package is part of the KDE games module.") (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (wrap-program (string-append out "/bin/kajongg") - `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) + `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))) #t)))))) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) |