From: Nikita Karetnikov <nikita@karetnikov.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: bug-guix@gnu.org
Subject: [PATCH] gnu: Add Grue Hunter.
Date: Thu, 30 May 2013 07:40:31 +0400 [thread overview]
Message-ID: <878v2xkuds.fsf_-_@karetnikov.org> (raw)
In-Reply-To: <878v34xujn.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 24 May 2013 17:32:44 +0200")
[-- Attachment #1.1: Type: text/plain, Size: 689 bytes --]
> See ‘package-from-tarball’ for an example, in bootstrap.scm.
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
[-- Attachment #1.2: 0001-gnu-Add-Grue-Hunter.patch --]
[-- Type: text/x-diff, Size: 4973 bytes --]
From a3592f86b78a3823fc8c4372ef4a1a574a9c6ad0 Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
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.
---
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
--- a/Makefile.am
+++ b/Makefile.am
@@ -114,6 +114,7 @@ MODULES = \
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
--- /dev/null
+++ b/gnu/packages/grue-hunter.scm
@@ -0,0 +1,84 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(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+)))
--
1.7.5.4
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2013-05-30 3:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 19:36 Grue Hunter: Can't create directories in the store Nikita Karetnikov
2013-05-15 0:59 ` Cyril Roelandt
2013-05-15 12:11 ` Ludovic Courtès
2013-05-16 2:35 ` Nikita Karetnikov
2013-05-16 16:33 ` Ludovic Courtès
2013-05-24 9:24 ` Nikita Karetnikov
2013-05-24 12:51 ` Ludovic Courtès
2013-05-24 14:34 ` Nikita Karetnikov
2013-05-24 15:32 ` Ludovic Courtès
2013-05-30 3:40 ` Nikita Karetnikov [this message]
2013-05-30 11:53 ` [PATCH] gnu: Add Grue Hunter Ludovic Courtès
2013-06-03 3:18 ` Nikita Karetnikov
2013-06-03 10:14 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878v2xkuds.fsf_-_@karetnikov.org \
--to=nikita@karetnikov.org \
--cc=bug-guix@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.