Commit | Line | Data |
---|---|---|
94e4ddd5 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (gnu packages grue-hunter) | |
20 | #:use-module (guix licenses) | |
21 | #:use-module (guix packages) | |
22 | #:use-module (guix download) | |
23 | #:use-module (guix build-system trivial) | |
24 | #:use-module (gnu packages base) | |
25 | #:use-module (gnu packages compression) | |
26 | #:use-module (gnu packages perl)) | |
27 | ||
28 | (define-public grue-hunter | |
29 | (package | |
30 | (name "grue-hunter") | |
31 | (version "1.0") | |
32 | (source | |
33 | (origin | |
34 | (method url-fetch) | |
35 | (uri (string-append "http://jxself.org/" name ".tar.gz")) | |
36 | (sha256 | |
37 | (base32 | |
38 | "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3")))) | |
39 | (build-system trivial-build-system) ; no Makefile.PL | |
40 | (arguments `(#:modules ((guix build utils)) | |
41 | #:builder | |
42 | (begin | |
43 | (use-modules (guix build utils)) | |
44 | (use-modules (srfi srfi-1)) | |
45 | ||
46 | (let* ((tarball (assoc-ref %build-inputs "tarball")) | |
47 | (perl (string-append (assoc-ref %build-inputs | |
48 | "perl") | |
49 | "/bin")) | |
50 | (gunzip (string-append (assoc-ref %build-inputs | |
51 | "gzip") | |
52 | "/bin/gunzip")) | |
53 | (tar (string-append (assoc-ref %build-inputs | |
54 | "tar") | |
55 | "/bin/tar")) | |
56 | (out (assoc-ref %outputs "out")) | |
57 | (bin (string-append out "/bin")) | |
58 | (doc (string-append out "/share/doc"))) | |
59 | (begin | |
60 | (mkdir out) | |
61 | (copy-file tarball "grue-hunter.tar.gz") | |
62 | (zero? (system* gunzip "grue-hunter.tar.gz")) | |
63 | (zero? (system* tar "xvf" "grue-hunter.tar")) | |
64 | ||
65 | (mkdir-p bin) | |
66 | (copy-file "grue-hunter/gh.pl" | |
67 | (string-append bin "/grue-hunter")) | |
68 | (patch-shebang (string-append bin "/grue-hunter") | |
69 | (list perl)) | |
70 | ||
71 | (mkdir-p doc) | |
72 | (copy-file "grue-hunter/AGPLv3.txt" | |
73 | (string-append doc "/grue-hunter"))))))) | |
74 | (inputs `(("perl" ,perl) | |
75 | ("tar" ,tar) | |
76 | ("gzip" ,gzip) | |
77 | ("tarball" ,source))) | |
78 | (home-page "http://jxself.org/grue-hunter.shtml") | |
79 | (synopsis "Text adventure game") | |
80 | (description | |
81 | "Grue Hunter is a text adventure game written in Perl. You must make | |
82 | your way through an underground cave system in search of the Grue. Can you | |
83 | capture it and get out alive?") | |
84 | (license agpl3+))) |