From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: [PATCH] gnu: Add Grue Hunter. Date: Thu, 30 May 2013 07:40:31 +0400 Message-ID: <878v2xkuds.fsf_-_@karetnikov.org> References: <878v3hgxql.fsf@karetnikov.org> <8761ykl9xl.fsf@gnu.org> <87fvxn3b51.fsf@karetnikov.org> <87ppwqdgv2.fsf@gnu.org> <87zjvkpw6o.fsf@karetnikov.org> <877giozglk.fsf@gnu.org> <87d2sgwio8.fsf@karetnikov.org> <878v34xujn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhtgH-0008Is-Bv for bug-guix@gnu.org; Wed, 29 May 2013 23:37:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhtgA-0007e9-6C for bug-guix@gnu.org; Wed, 29 May 2013 23:37:37 -0400 In-Reply-To: <878v34xujn.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 24 May 2013 17:32:44 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: bug-guix@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > See =E2=80=98package-from-tarball=E2=80=99 for an example, in bootstrap.s= cm. Thanks. Can I push the attached patch along with this one [1,2]? Two questions, though: 1. Is it necessary to use 'begin' here? (begin (mkdir out) (copy-file tarball "grue-hunter.tar.gz") ...) 2. I'd like to use (patch-shebang (string-append bin "/grue-hunter") (list perl)) instead of (substitute* (string-append bin "/grue-hunter") (("#!/usr/bin/perl") (string-append "#!" perl))) But the former fails to find Perl. Why? [1] https://lists.gnu.org/archive/html/bug-guix/2013-05/txtJNCpY2SXeq.txt [2] https://lists.gnu.org/archive/html/bug-guix/2013-05/msg00036.html --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-Grue-Hunter.patch Content-Transfer-Encoding: quoted-printable From=20a3592f86b78a3823fc8c4372ef4a1a574a9c6ad0 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Thu, 30 May 2013 03:15:37 +0000 Subject: [PATCH] gnu: Add Grue Hunter. * gnu/packages/grue-hunter.scm: New file. * Makefile.am (MODULES): Add it. =2D-- Makefile.am | 1 + gnu/packages/grue-hunter.scm | 84 ++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 85 insertions(+), 0 deletions(-) create mode 100644 gnu/packages/grue-hunter.scm diff --git a/Makefile.am b/Makefile.am index 8592c5b..3d823ea 100644 =2D-- a/Makefile.am +++ b/Makefile.am @@ -114,6 +114,7 @@ MODULES =3D \ gnu/packages/gprolog.scm \ gnu/packages/groff.scm \ gnu/packages/grub.scm \ + gnu/packages/grue-hunter.scm \ gnu/packages/gsasl.scm \ gnu/packages/gtk.scm \ gnu/packages/guile.scm \ diff --git a/gnu/packages/grue-hunter.scm b/gnu/packages/grue-hunter.scm new file mode 100644 index 0000000..764eda0 =2D-- /dev/null +++ b/gnu/packages/grue-hunter.scm @@ -0,0 +1,84 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2013 Nikita Karetnikov +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages grue-hunter) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages perl)) + +(define-public grue-hunter + (package + (name "grue-hunter") + (version "1.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://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/perl")) + (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")) + (substitute* (string-append bin "/grue-hunter") + (("#!/usr/bin/perl") (string-append "#!" 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 agpl3+))) =2D-=20 1.7.5.4 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJRpsozAAoJEM+IQzI9IQ38w5IP/3HcnawtoGTZtIBXJfxTbvZY NyZoC60MByNBxHn7bXGISP+1rlDEs+9w4grwOaaW9O0saIrTpxg5j4li4Hj9/1hm jn0kwqkDxhDcPxWCJSh6uSkBf9fyOdeYrl6Iur/baGVrJOKN8KmhOaBC4MO0Hsrc /qRZ/Wx/C0v0yBXm+OPilJNLl5akx7/6ho7nzgPsG3dnf0SeM4oeSZauqZPmtCgE x4X4SdhaL7GPgKq4jJj1f85sz2Km+d0GSZK+CtZAjhfC4QqTngDGq0CamDcbB3gC xo+169WmLOeT4upo6ttXNrfnNunuUxeEytrimVZcjirwyc2fFdE0mqKK7SXG/XEX fV+GzXyEZVUubCIUpNJR8AvUQBe+ZuUfLIOI9uEMOkMUvFzsgv9Ln0YOrGoaMlxp OeTuzhQXiXwK+k+srIVR6e9Nr2tvcEBqPqb47C6xnwluED7qT9V6J/Jfgy92emAw GY4abpEy1m9zxo6Qc05k4GQcidHBUs3Xdqd2448Vp2ltKISRTSU7PQ41VazxMy8u 6iu5ptmXMKp1fUb02xktFU+Ih5Z/YyBhgfMh/bw67l2oWKO0f3O1IEQXh9DD2JgG 4f/u+w7EebllCVa+PDdSH80TpNa+07E1PoGp5xM71ew6HdBEVrtr3geUFXuWdLhP vxz5qLuOtYwIhyv3pO// =DPGv -----END PGP SIGNATURE----- --==-=-=--