summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-15 11:02:16 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-15 15:26:30 +0200
commit0fb9a15bb5faf34214689810ff98b23a4295f04e (patch)
treec130d6bfb09f0fa2bf7fc2e76b2ef7ba2bc40169 /gnu/packages/games.scm
parentda675305ddf2ba574e309e515d18ae1f778297be (diff)
downloadguix-0fb9a15bb5faf34214689810ff98b23a4295f04e.tar.gz
gnu: grue-hunter: Move to (gnu packages games).
* gnu/packages/grue-hunter.scm: Remove.  Move contents to...
* gnu/packages/games.scm (grue-hunter): ... here.  New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 9f4a4f9e81..b0bf4e3546 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org>
 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2338,3 +2339,60 @@ Super Game Boy, BS-X Satellaview, and Sufami Turbo.")
     ;; - icarus/icarus.cpp
     ;; - higan/emulator/emulator.hpp
     (license license:gpl3)))
+
+(define-public grue-hunter
+  (package
+    (name "grue-hunter")
+    (version "1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://jxself.org/" name ".tar.gz"))
+              (sha256
+               (base32
+                "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
+    (build-system trivial-build-system) ; no Makefile.PL
+    (arguments `(#:modules ((guix build utils))
+                 #:builder
+                 (begin
+                   (use-modules (guix build utils))
+                   (use-modules (srfi srfi-1))
+
+                   (let* ((tarball (assoc-ref %build-inputs "tarball"))
+                          (perl    (string-append (assoc-ref %build-inputs
+                                                             "perl")
+                                                  "/bin"))
+                          (gunzip  (string-append (assoc-ref %build-inputs
+                                                             "gzip")
+                                                  "/bin/gunzip"))
+                          (tar     (string-append (assoc-ref %build-inputs
+                                                             "tar")
+                                                  "/bin/tar"))
+                          (out     (assoc-ref %outputs "out"))
+                          (bin     (string-append out "/bin"))
+                          (doc     (string-append out "/share/doc")))
+                     (begin
+                       (mkdir out)
+                       (copy-file tarball "grue-hunter.tar.gz")
+                       (zero? (system* gunzip "grue-hunter.tar.gz"))
+                       (zero? (system* tar "xvf"  "grue-hunter.tar"))
+
+                       (mkdir-p bin)
+                       (copy-file "grue-hunter/gh.pl"
+                                  (string-append bin "/grue-hunter"))
+                       (patch-shebang (string-append bin "/grue-hunter")
+                                      (list perl))
+
+                       (mkdir-p doc)
+                       (copy-file "grue-hunter/AGPLv3.txt"
+                                  (string-append doc "/grue-hunter")))))))
+    (inputs `(("perl" ,perl)
+              ("tar" ,tar)
+              ("gzip" ,gzip)
+              ("tarball" ,source)))
+    (home-page "http://jxself.org/grue-hunter.shtml")
+    (synopsis "Text adventure game")
+    (description
+     "Grue Hunter is a text adventure game written in Perl.  You must make
+your way through an underground cave system in search of the Grue.  Can you
+capture it and get out alive?")
+    (license license:agpl3+)))