all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 50273@debbugs.gnu.org
Subject: [bug#50273] [PATCH] gnu: Add python-pyxel.
Date: Mon, 30 Aug 2021 17:30:03 +0200	[thread overview]
Message-ID: <20210830153003.27134-1-leo.prikler@student.tugraz.at> (raw)

* gnu/packages/game-development.scm (python-pyxel): New variable.
---
 gnu/packages/game-development.scm | 55 +++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 2a58848dce..3e21d411cf 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1484,6 +1484,61 @@ visual novels, while its Python scripting is enough for complex simulation
 games.")
     (license license:expat)))
 
+(define-public python-pyxel
+  (package
+    (name "python-pyxel")
+    (version "1.4.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/kitao/pyxel")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0bwsgb5yq5s479cnf046v379zsn5ybp5195kbfvzr9l11qbaicm9"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively "pyxel/core/bin")))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ; "Tests" are actually example programs that never halt.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-build-files
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "setup.py"
+               (("\"pyxel\\.core\\.bin\\.(.*)\"," all arch)
+                (if (string=? arch "linux")
+                    all
+                    "")))
+             (let* ((sdl2 (assoc-ref inputs "sdl2")))
+               (substitute* "pyxel/core/Makefile"
+                 (("`sdl2-config --cflags`")
+                  (string-append "-I" sdl2 "/include/SDL2 -D_REENTRANT"))
+                 (("`sdl2-config --libs`")
+                  (string-append "-L" sdl2 "/lib "
+                                 "-Wl,-rpath," sdl2 "/lib "
+                                 "-Wl,--enable-new-dtags -lSDL2"))))))
+         (add-before 'build 'prebuild
+           (lambda _
+             (invoke "make" "-C" "pyxel/core"))))))
+    (inputs
+     `(("gifsicle" ,gifsicle)
+       ("sdl2" ,(sdl-union (list sdl2 sdl2-image)))))
+    (native-inputs
+     `(("gcc" ,gcc-10)))                  ; for std::filesystem
+    (home-page "https://github.com/kitao/pyxel")
+    (synopsis "Retro game engine for Python")
+    (description "Pyxel is a game engine inspired by retro gaming consoles.
+It has a fixed 16-color palette, can hold up to 3 image banks and 8 tilemaps
+(256x256 pixels each) and 4 sound channels with 64 definable sounds.  It
+also comes with a built-in image and sound editor.")
+    (license license:expat)))
+
 (define-public grafx2
   (package
     (name "grafx2")
-- 
2.33.0





             reply	other threads:[~2021-08-30 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 15:30 Leo Prikler [this message]
2021-08-30 18:40 ` [bug#50273] [PATCH] gnu: Add python-pyxel Maxim Cournoyer
2021-08-30 19:02 ` [bug#50273] [PATCH v2] " Leo Prikler
2021-08-30 20:27   ` Maxim Cournoyer
2021-08-31 21:27     ` bug#50273: " Leo Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210830153003.27134-1-leo.prikler@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=50273@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.