From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Grue Hunter: Can't create directories in the store Date: Wed, 15 May 2013 14:11:34 +0200 Message-ID: <8761ykl9xl.fsf@gnu.org> References: <878v3hgxql.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcaYc-0007m2-I3 for bug-guix@gnu.org; Wed, 15 May 2013 08:11:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcaYa-0004o5-PC for bug-guix@gnu.org; Wed, 15 May 2013 08:11:46 -0400 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=39991 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcaYa-0004kB-Jy for bug-guix@gnu.org; Wed, 15 May 2013 08:11:44 -0400 In-Reply-To: <878v3hgxql.fsf@karetnikov.org> (Nikita Karetnikov's message of "Tue, 14 May 2013 23:36:18 +0400") 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: Nikita Karetnikov Cc: bug-guix@gnu.org Hello! Nikita Karetnikov skribis: > The game is just a single Perl file. I think this is a good use case for =E2=80=98trivial-build-system=E2=80=99. Basically, with =E2=80=98trivial-build-system=E2=80=99, you just pass a Sch= eme expression that produces the result. In your case that would be along the lines of: (begin (use-modules (guix build utils)) (let* ((gh (assoc-ref %build-inputs "source")) (perl (assoc-ref %build-inputs "perl")) (out (assoc-ref %outputs "out")) (bin (string-append out "/bin))) (mkdir-p bin) (copy-file gh (string-append bin "/gh")) (patch-shebang (string-append bin "/gh") (list (string-append perl "/bin"))) ;; ... )) > What directories should be created in the store? $out/bin for the program, and $out/share/doc/grue-hunter for the license fi= le. > And how can I create such directories? With the =E2=80=98mkdir=E2=80=99 and =E2=80=98mkdir-p=E2=80=99 procedures. > I've tried several things: > > 1. (zero? (system (format #f "cp -r . ~a" out))) Avoid calling out to Coreutils. Guile and the (guix build utils) provide us with everything we need to do that. HTH! Ludo=E2=80=99.