diff options
Diffstat (limited to 'gnu/packages/game-development.scm')
-rw-r--r-- | gnu/packages/game-development.scm | 84 |
1 files changed, 52 insertions, 32 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 7aef6b09d2..ee8dea23b5 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> -;;; Copyright © 2019 Leo Prikler <leo.prikler@student.tugraz.at> +;;; Copyright © 2019, 2020 Leo Prikler <leo.prikler@student.tugraz.at> ;;; Copyright © 2019 Jethro Cao <jethrocao@gmail.com> ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; @@ -1086,39 +1086,31 @@ developed mainly for Ren'py.") (setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":")) #t)) (replace 'build - (lambda args - (apply - (lambda* (build-root #:key inputs outputs #:allow-other-keys) - ;; The "module" subdirectory contains a python (really cython) - ;; project, which is built using a script, that is thankfully - ;; named "setup.py". - (chdir "module") - (apply (assoc-ref %standard-phases 'build) args) - ;; the above causes renpy.__init__ to be compiled but does not - ;; compile anything else, hence we do that here - (chdir build-root) - (delete-file "renpy/__init__.pyc") - (invoke "python" "-m" "compileall" "renpy")) - (getcwd) args) + (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) + ;; The "module" subdirectory contains a python (really cython) + ;; project, which is built using a script, that is thankfully + ;; named "setup.py". + (with-directory-excursion "module" + (apply (assoc-ref %standard-phases 'build) args)) + ;; the above causes renpy.__init__ to be compiled but does not + ;; compile anything else, hence we do that here + (delete-file "renpy/__init__.pyc") + (invoke "python" "-m" "compileall" "renpy") #t)) (replace 'install - (lambda args - (apply - (lambda* (build-root #:key inputs outputs #:allow-other-keys) - ;; Again, we have to wrap the module installation. - ;; Additionally, we want to install the python code - ;; (both source and compiled) in the same directory. - (let* ((out (assoc-ref outputs "out")) - (site (string-append "/lib/python" - ,(version-major+minor - (package-version python-2)) - "/site-packages"))) - (chdir "module") - (apply (assoc-ref %standard-phases 'install) args) - (chdir build-root) - (copy-recursively "renpy" - (string-append out site "/renpy")))) - (getcwd) args) + (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) + ;; Again, we have to wrap the module installation. + ;; Additionally, we want to install the python code + ;; (both source and compiled) in the same directory. + (let* ((out (assoc-ref outputs "out")) + (site (string-append "/lib/python" + ,(version-major+minor + (package-version python-2)) + "/site-packages"))) + (with-directory-excursion "module" + (apply (assoc-ref %standard-phases 'install) args)) + (copy-recursively "renpy" + (string-append out site "/renpy"))) #t))))) (inputs `(("ffmpeg" ,ffmpeg) @@ -2029,3 +2021,31 @@ environments and virtual creatures. It is currently used in many computer games, 3D authoring tools and simulation tools.") ;; Software is dual-licensed. (license (list license:lgpl2.1+ license:expat)))) + +(define-public chipmunk + (package + (name "chipmunk") + (version "7.0.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/slembcke/Chipmunk2D.git") + (commit (string-append "Chipmunk-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qmkn01g06p3rnhmbyffmjns6wj5vhgf9cscigk3wzxcpwv1hyxb")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;no test + #:configure-flags '("-DBUILD_STATIC=OFF" + "-DBUILD_DEMOS=OFF"))) + (inputs + `(("freeglut" ,freeglut) + ("libxmu" ,libxmu) + ("libxrandr" ,libxrandr))) + (home-page "https://chipmunk-physics.net/") + (synopsis "Fast and lightweight 2D game physics library") + (description "Chipmunk is a simple, lightweight, fast and portable 2D +rigid body physics library written in C.") + (license license:expat))) |