From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIhj7-0007SZ-UG for guix-patches@gnu.org; Sat, 25 Nov 2017 16:11:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIhj4-000506-ML for guix-patches@gnu.org; Sat, 25 Nov 2017 16:11:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49587) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIhj4-0004za-IH for guix-patches@gnu.org; Sat, 25 Nov 2017 16:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eIhj4-0003XD-9h for guix-patches@gnu.org; Sat, 25 Nov 2017 16:11:02 -0500 Subject: [bug#29445] [PATCH] gnu: Add roguebox-adventures. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIhhx-0007La-MS for guix-patches@gnu.org; Sat, 25 Nov 2017 16:09:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIhhu-00043g-FM for guix-patches@gnu.org; Sat, 25 Nov 2017 16:09:53 -0500 Received: from mout01.posteo.de ([185.67.36.141]:35530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eIhhu-000419-10 for guix-patches@gnu.org; Sat, 25 Nov 2017 16:09:50 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5C70E20DE8 for ; Sat, 25 Nov 2017 22:09:39 +0100 (CET) From: Kei Kebreau Date: Sat, 25 Nov 2017 16:09:28 -0500 Message-Id: <20171125210928.24879-1-kkebreau@posteo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29445@debbugs.gnu.org Cc: Kei Kebreau From: Kei Kebreau * gnu/packages/games.scm (roguebox-adventures): New variable. --- gnu/packages/games.scm | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index b1ba28a62..5b1558c6f 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -580,6 +580,90 @@ utilizing the art assets from the @code{SuperTux} project.") license:gpl2+ license:gpl3+)))) +(define-public roguebox-adventures + (let ((commit "19a2c340b34d5b4e7cc89118c7aedc058babbd93") + (revision "1")) + (package + (name "roguebox-adventures") + (version (string-append "2.1.2." revision "." (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.postactiv.com/themightyglider/RogueBoxAdventures") + (commit commit))) + (sha256 + (base32 + "0afmg8fjdcs3sqdp5rc7irgr7riil8jwysfjn1imfxslf1wcx5ah")))) + (build-system python-build-system) + (arguments + '(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + ;; no setup.py script + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (data (string-append + out "/share/games/roguebox-adventures"))) + ;; Use the correct data directory. + (substitute* '("main.py" "LIB/getch.py" "LIB/getch_gcwz.py") + (("basic_path + os\\.sep + 'DATA'") + (string-append "'" data "'")) + (("^basic_path.*$") + (string-append "basic_path ='" data "'\n"))) + (substitute* "LIB/gra_files.py" + (("basic_path = b_path\\.replace\\('/LIB',''\\)") + (string-append "basic_path ='" data "'\n"))) + + ;; The game must save in the user's home directory because + ;; the store is read-only. + (substitute* "main.py" + (("home_save = False") "home_save = True") + (("'icon_small.png'") + (string-append "'" data "/icon_small.png'")))) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (data (string-append + out "/share/games/roguebox-adventures")) + (doc (string-append out "/share/doc"))) + (mkdir-p bin) + (mkdir-p doc) + + (copy-file "main.py" + (string-append bin "/roguebox-adventures")) + (chmod (string-append bin "/roguebox-adventures") #o555) + + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" file))) + '("AUDIO" "FONT" "GRAPHIC" "LIB" "LICENSE" + "icon_big.png" "icon_small.png")) + + (copy-file "DOC" (string-append doc "/roguebox-adventures")) + + (wrap-program (string-append bin "/roguebox-adventures") + `("PYTHONPATH" ":" prefix (,(string-append data "/LIB"))))) + #t))))) + (inputs + `(("python-pygame" ,python-pygame) + ("python-tmx" ,python-tmx))) + (home-page "https://rogueboxadventures.tuxfamily.org") + (synopsis "A classical roguelike/sandbox game") + (description + "RogueBox Adventures is a graphical roguelike with strong influences +from sandbox games like Minecraft or Terraria. The main idea of RogueBox +Adventures is to offer the player a kind of roguelike toy-world. This world +can be explored and changed freely.") + ;; The GPL3+ is for code, the rest are for art. + (license (list license:cc0 + license:cc-by3.0 + license:gpl3+ + license:silofl1.1))))) + (define-public xshogi (package (name "xshogi") -- 2.15.0