aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm182
1 files changed, 101 insertions, 81 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e5f8350f6a..e4f87a6c46 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -773,90 +773,110 @@ utilizing the art assets from the @code{SuperTux} project.")
license:gpl3+))))
(define-public roguebox-adventures
- (let ((commit "19a2c340b34d5b4e7cc89118c7aedc058babbd93")
- (revision "1"))
- (package
- (name "roguebox-adventures")
- (version (git-version "2.1.2" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri
- (git-reference
- (url "https://git.postactiv.com/themightyglider/RogueBoxAdventures.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (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/roguebox-adventures")))
- (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-recursively "DOC" doc)
-
- (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
+ (package
+ (name "roguebox-adventures")
+ (version "2.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://download.tuxfamily.org/rba/RogueBoxAdventures_v"
+ (string-join (string-split version #\.) "_") "_Source.zip"))
+ (file-name (string-append name "-" version ".zip"))
+ (sha256
+ (base32
+ "0kmzdgnik8fsf3bg55546l77p3mfxn2awkzfzzdn20n82rd2babw"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (and (invoke "unzip" source)
+ ;; The actual source is buried a few directories deep.
+ (chdir (string-append "RogueBoxAdventures_v"
+ (string-join
+ (string-split ,version #\.) "_")
+ "_Source")))))
+ ;; 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"))
+ (roguebox-adventures
+ (string-append bin "/roguebox-adventures"))
+ (data (string-append
+ out "/share/games/roguebox-adventures"))
+ (lib (string-append data "/LIB"))
+ (doc (string-append
+ out "/share/doc/roguebox-adventures")))
+ (mkdir-p bin)
+ (mkdir-p doc)
+
+ (for-each (lambda (file)
+ (copy-recursively file
+ (string-append data "/" file)))
+ '("AUDIO" "FONT" "GRAPHIC" "LIB" "LICENSE"
+ "icon_big.png" "icon_small.png"))
+ (for-each (lambda (file)
+ (chmod file #o555)
+ (install-file file lib))
+ '("main.py" "run.py"))
+
+ (copy-recursively "DOC" doc)
+
+ (call-with-output-file
+ roguebox-adventures
+ (lambda (p)
+ (format p "\
+#!~a
+export PYTHONPATH=~a/LIB:~a
+exec -a \"~a\" ~a \"$@\"\n"
+ (which "bash") data (getenv "PYTHONPATH")
+ (which "python3")
+ (string-append lib "/main.py"))))
+ (chmod roguebox-adventures #o555))
+ #t)))))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (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)))))
+ ;; 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