From patchwork Mon Aug 30 15:30:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 32410 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 64F2527BBE3; Mon, 30 Aug 2021 16:34:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 22B6527BBE1 for ; Mon, 30 Aug 2021 16:34:33 +0100 (BST) Received: from localhost ([::1]:43192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKjIu-0005Rr-6e for patchwork@mira.cbaines.net; Mon, 30 Aug 2021 11:34:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKjGU-00030t-UO for guix-patches@gnu.org; Mon, 30 Aug 2021 11:32:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKjGU-0002dS-M7 for guix-patches@gnu.org; Mon, 30 Aug 2021 11:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKjGU-0008EO-8t for guix-patches@gnu.org; Mon, 30 Aug 2021 11:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50273] [PATCH] gnu: Add python-pyxel. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50273 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50273@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163033746831558 (code B ref -1); Mon, 30 Aug 2021 15:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Aug 2021 15:31:08 +0000 Received: from localhost ([127.0.0.1]:60009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKjFb-0008Cw-Qu for submit@debbugs.gnu.org; Mon, 30 Aug 2021 11:31:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:42104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKjFX-0008Ck-KB for submit@debbugs.gnu.org; Mon, 30 Aug 2021 11:31:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKjFX-0002Gu-2K for guix-patches@gnu.org; Mon, 30 Aug 2021 11:31:03 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:38431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKjFO-0001bY-V9 for guix-patches@gnu.org; Mon, 30 Aug 2021 11:31:02 -0400 Received: from localhost.localdomain (194-118-34-199.adsl.highway.telekom.at [194.118.34.199]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GyvR53CFYz3wHN for ; Mon, 30 Aug 2021 17:30:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1630337441; bh=MmEFEWH4Xw+vkdF7AA8GnbFfr5aeGbcOO8rxMKv918k=; h=From:To:Subject:Date; b=DVoPleZ1hh6QjRYwSUNn3jOciNMhgnHLtzJJzotAX2CNFaJ/MlMQkrs/vFomduK/F XgmSdt53Tru0Dk3aOmj+1IhcVTJ8Ypqvn5Y/UxyGxfPxTrP2py96gOqI+7EjOzl1dX /Ax31+JTbJ1wpABqhp5tG+MDb5isjXqUlNYP2CLo= From: Leo Prikler Date: Mon, 30 Aug 2021 17:30:03 +0200 Message-Id: <20210830153003.27134-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 Received-SPF: pass client-ip=129.27.2.202; envelope-from=leo.prikler@student.tugraz.at; helo=mailrelay.tugraz.at X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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")