From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: Re: [PATCH] gnu: Add bash-tap. Date: Tue, 03 May 2016 12:44:57 +0200 Message-ID: <87h9ef5sk6.fsf@gnu.org> References: <8760wlrst0.fsf@gnu.org> <20160318184342.GB9682@jasmine> <20160318185339.GA20746@solar> <20160318191519.GF9682@jasmine> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axXpS-0007GT-RV for guix-devel@gnu.org; Tue, 03 May 2016 06:45:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axXpH-0006Al-07 for guix-devel@gnu.org; Tue, 03 May 2016 06:45:17 -0400 In-reply-to: <20160318191519.GF9682@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org Leo Famulari writes: > On Fri, Mar 18, 2016 at 07:53:39PM +0100, Andreas Enge wrote: >> On Fri, Mar 18, 2016 at 02:43:42PM -0400, Leo Famulari wrote: >> > Can someone with more experience take a look and apply the patch if it's >> > okay? >> >> I had a look (without having much experience with the trivial build system), >> and it looks mostly clean. However, the package installs three bash scripts >> that start with "#!/bin/bash". This will not work on GuixSD, where only >> /bin/sh exists. It should be patched by adding bash as an input and >> substituting. Alternatively, you could use the gnu-build-system, delete most >> of the phases, set #:tests? to #f and add a custom install phase; then the >> patch-shebangs phase will do its magic. > > Good catch! > > I think using gnu-build-system is the way to go. Here's a patch using the gnu build system: >From 7daef2ee0fdb1aef7344da6ff0afe31efcf41cac Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 3 May 2016 12:43:00 +0200 Subject: [PATCH] gnu: Add bash-tap. * gnu/packages/bash.scm (bash-tap): New variable. --- gnu/packages/bash.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index cad66da..969065e 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -318,3 +318,36 @@ without modification.") completion for many common commands.") (home-page "http://bash-completion.alioth.debian.org/") (license gpl2+))) + +(define-public bash-tap + (package + (name "bash-tap") + (version "1.0.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/illusori/bash-tap/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0qs1qi38bl3ns4mpagcawv618dsk2q1lgrbddgvs0wl3ia12cyz5")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; There is no test suite. + #:phases + (modify-phases %standard-phases + (delete 'configure) ; There is no Makefile. + (delete 'build) ; There is no Makefile. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (install-file "bash-tap" bin) + (install-file "bash-tap-bootstrap" bin) + (install-file "bash-tap-mock" bin))))))) + (home-page "http://www.illusori.co.uk/projects/bash-tap/") + (synopsis "Bash port of a Test::More/Test::Builder-style TAP-compliant +test library") + (description "Bash TAP is a TAP-compliant Test::More-style testing library +for Bash shell scripts and functions. Along with the Test::More-style testing +helpers it provides helper functions for mocking commands and in-process output +capturing.") + (license expat))) -- 2.7.4