all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikita Karetnikov <nikita@karetnikov.org>
To: bug-guix@gnu.org
Subject: Grue Hunter: Can't create directories in the store
Date: Tue, 14 May 2013 23:36:18 +0400	[thread overview]
Message-ID: <878v3hgxql.fsf@karetnikov.org> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 826 bytes --]

I'm trying to package Grue Hunter [1].

The game is just a single Perl file.  What directories should be created
in the store?  And how can I create such directories?

I've tried several things:

1. (zero? (system (format #f "cp -r . ~a" out)))

   Pollutes the profile with 'AGPLv3.txt', 'gh.pl', and 'README'.

2. (zero? (system (format #f "mkdir bin ~a/" out)))

   Creates 'bin', but the output doesn't contain it.

3. (zero? (system (format #f "mkdir bin ~a/" out)))
   (zero? (system (format #f "cp gh.pl ~a/bin/" out)))

   Creates a file called 'bin', not a directory.  Could anyone explain
   why?  Fails with:

   cp: cannot create regular file '/nix/store/clwpaljwanw7397qafxv82vj1b8jm82q-grue-hunter-1.0/bin/': Not a directory

I'm attaching a recipe and a related patch.

[1] http://jxself.org/grue-hunter.shtml


[-- Attachment #1.2: grue-hunter.scm --]
[-- Type: text/plain, Size: 2865 bytes --]

;;; 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 gnu)
  #: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 gnu-build-system) ; no Makefile.PL
    (arguments `(#:modules ((guix build gnu-build-system)
                            (guix build utils)
                            (srfi srfi-1))
                 #:phases
                 (alist-replace
                  'install
                  (lambda* (#:key outputs #:allow-other-keys)
                    (let ((out (assoc-ref outputs "out")))
                      ;; (zero? (system (format #f "cp -r . ~a" out)))

                      (zero? (system (format #f "mkdir bin ~a/" out)))
                      (zero? (system (format #f "cp gh.pl ~a/bin/" out)))))
                  (alist-delete
                   'configure
                   (alist-delete
                    'patch-generated-file-shebangs
                    (alist-delete
                     'build
                     (alist-delete
                      'check
                      (alist-delete
                       'patch-shebangs
                       (alist-delete
                        'strip
                        %standard-phases)))))))
                 #:tests? #f)) ; no test target
    (inputs `(("perl" ,perl)))
    (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+)))

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0001-licenses-Add-agpl3-and-agpl3.patch --]
[-- Type: text/x-diff, Size: 1228 bytes --]

From 436dc3da50aa2a82a7d47930c493ccb73a3accec Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Tue, 14 May 2013 18:57:42 +0000
Subject: [PATCH] licenses: Add 'agpl3' and 'agpl3+'.

* guix/licenses.scm (agpl3, agpl3+): New variables.
---
 guix/licenses.scm |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/guix/licenses.scm b/guix/licenses.scm
index 9c4e177..c0a0e60 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -21,6 +21,7 @@
 (define-module (guix licenses)
   #:use-module (srfi srfi-9)
   #:export (license? license-name license-uri license-comment
+            agpl3 agpl3+
             asl2.0
             boost1.0
             bsd-2 bsd-3 bsd-4 bsd-style
@@ -60,6 +61,16 @@
 ;;;
 ;;; Code:
 
+(define agpl3
+  (license "AGPL 3"
+           "https://gnu.org/licenses/agpl.html"
+           "https://gnu.org/licenses/why-affero-gpl.html"))
+
+(define agpl3+
+  (license "AGPL 3+"
+           "https://gnu.org/licenses/agpl.html"
+           "https://gnu.org/licenses/why-affero-gpl.html"))
+
 (define asl2.0
   (license "ASL 2.0"
            "http://directory.fsf.org/wiki/License:Apache2.0"
-- 
1.7.5.4


[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

             reply	other threads:[~2013-05-14 19:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14 19:36 Nikita Karetnikov [this message]
2013-05-15  0:59 ` Grue Hunter: Can't create directories in the store 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               ` [PATCH] gnu: Add Grue Hunter Nikita Karetnikov
2013-05-30 11:53                 ` 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=878v3hgxql.fsf@karetnikov.org \
    --to=nikita@karetnikov.org \
    --cc=bug-guix@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.