You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

85 lines
3.6 KiB

  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. (define-module (gnu packages grue-hunter)
  19. #:use-module (guix licenses)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system trivial)
  23. #:use-module (gnu packages base)
  24. #:use-module (gnu packages compression)
  25. #:use-module (gnu packages perl))
  26. (define-public grue-hunter
  27. (package
  28. (name "grue-hunter")
  29. (version "1.0")
  30. (source
  31. (origin
  32. (method url-fetch)
  33. (uri (string-append "http://jxself.org/" name ".tar.gz"))
  34. (sha256
  35. (base32
  36. "1hjcpy5439qs3v2zykis7hsi0i17zjs62gks3zd8mnfw9ni4i2h3"))))
  37. (build-system trivial-build-system) ; no Makefile.PL
  38. (arguments `(#:modules ((guix build utils))
  39. #:builder
  40. (begin
  41. (use-modules (guix build utils))
  42. (use-modules (srfi srfi-1))
  43. (let* ((tarball (assoc-ref %build-inputs "tarball"))
  44. (perl (string-append (assoc-ref %build-inputs
  45. "perl")
  46. "/bin"))
  47. (gunzip (string-append (assoc-ref %build-inputs
  48. "gzip")
  49. "/bin/gunzip"))
  50. (tar (string-append (assoc-ref %build-inputs
  51. "tar")
  52. "/bin/tar"))
  53. (out (assoc-ref %outputs "out"))
  54. (bin (string-append out "/bin"))
  55. (doc (string-append out "/share/doc")))
  56. (begin
  57. (mkdir out)
  58. (copy-file tarball "grue-hunter.tar.gz")
  59. (zero? (system* gunzip "grue-hunter.tar.gz"))
  60. (zero? (system* tar "xvf" "grue-hunter.tar"))
  61. (mkdir-p bin)
  62. (copy-file "grue-hunter/gh.pl"
  63. (string-append bin "/grue-hunter"))
  64. (patch-shebang (string-append bin "/grue-hunter")
  65. (list perl))
  66. (mkdir-p doc)
  67. (copy-file "grue-hunter/AGPLv3.txt"
  68. (string-append doc "/grue-hunter")))))))
  69. (inputs `(("perl" ,perl)
  70. ("tar" ,tar)
  71. ("gzip" ,gzip)
  72. ("tarball" ,source)))
  73. (home-page "http://jxself.org/grue-hunter.shtml")
  74. (synopsis "Text adventure game")
  75. (description
  76. "Grue Hunter is a text adventure game written in Perl. You must make
  77. your way through an underground cave system in search of the Grue. Can you
  78. capture it and get out alive?")
  79. (license agpl3+)))