summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2021-08-30 17:27:25 +0200
committerLeo Prikler <leo.prikler@student.tugraz.at>2021-08-31 23:20:09 +0200
commitbca5d7dbb0fc919f954a8fe5f6236c0a89e451bd (patch)
tree8ff29db2c033fa9db4c9f33af714f8733b09c694
parent4abf2268338f34fc85a24e14a3bbcc6803fa0e82 (diff)
gnu: Add python-pyxel.
* gnu/packages/game-development.scm (python-pyxel): New variable.
-rw-r--r--gnu/packages/game-development.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 2a58848dce5..40807450ea4 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1484,6 +1484,57 @@ visual novels, while its Python scripting is enough for complex simulation
1484games.") 1484games.")
1485 (license license:expat))) 1485 (license license:expat)))
1486 1486
1487(define-public python-pyxel
1488 (package
1489 (name "python-pyxel")
1490 (version "1.4.3")
1491 (source
1492 (origin
1493 (method git-fetch)
1494 (uri
1495 (git-reference
1496 (url "https://github.com/kitao/pyxel")
1497 (commit (string-append "v" version))))
1498 (file-name (git-file-name name version))
1499 (sha256
1500 (base32
1501 "0bwsgb5yq5s479cnf046v379zsn5ybp5195kbfvzr9l11qbaicm9"))
1502 (modules '((guix build utils)))
1503 (snippet
1504 '(begin
1505 (delete-file-recursively "pyxel/core/bin")))))
1506 (build-system python-build-system)
1507 (arguments
1508 `(#:tests? #f ; "Tests" are actually example programs that never halt.
1509 #:phases
1510 (modify-phases %standard-phases
1511 (add-after 'unpack 'patch-build-files
1512 (lambda* (#:key inputs #:allow-other-keys)
1513 (substitute* "setup.py"
1514 (("\"pyxel\\.core\\.bin\\.(.*)\"," all arch)
1515 (if (string=? arch "linux")
1516 all
1517 "")))
1518 (substitute* "pyxel/core/Makefile"
1519 (("`sdl2-config")
1520 (string-append "`sdl2-config --prefix="
1521 (assoc-ref inputs "sdl2"))))))
1522 (add-before 'build 'prebuild
1523 (lambda _
1524 (invoke "make" "-C" "pyxel/core"))))))
1525 (inputs
1526 `(("gifsicle" ,gifsicle)
1527 ("sdl2" ,(sdl-union (list sdl2 sdl2-image)))))
1528 (native-inputs
1529 `(("gcc" ,gcc-10))) ; for std::filesystem
1530 (home-page "https://github.com/kitao/pyxel")
1531 (synopsis "Retro game engine for Python")
1532 (description "Pyxel is a game engine inspired by retro gaming consoles.
1533It has a fixed 16-color palette, can hold up to 3 image banks and 8 tilemaps
1534(256x256 pixels each) and 4 sound channels with 64 definable sounds. It
1535also comes with a built-in image and sound editor.")
1536 (license license:expat)))
1537
1487(define-public grafx2 1538(define-public grafx2
1488 (package 1539 (package
1489 (name "grafx2") 1540 (name "grafx2")