>From f50ae55cfd2edc513de33b2736f9c3a13cd43532 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Thu, 17 Mar 2016 17:03:34 +0100 Subject: [PATCH] gnu: Add bash-tap. * gnu/packages/bash.scm (bash-tap): New variable. --- gnu/packages/bash.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 15909c7..b875ab8 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -21,6 +21,8 @@ (define-module (gnu packages bash) #:use-module (guix licenses) #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) #:use-module (gnu packages readline) #:use-module (gnu packages bison) @@ -29,6 +31,7 @@ #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:autoload (guix gnupg) (gnupg-verify*) #:autoload (guix hash) (port-sha256) #:autoload (guix base32) (bytevector->nix-base32-string) @@ -318,3 +321,46 @@ 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 trivial-build-system) + (native-inputs + `(("source" ,source) + ("tar" ,tar) + ("gzip" ,gzip))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar")) + (path (string-append (assoc-ref %build-inputs "gzip") "/bin")) + (bin (string-append %output "/bin")) + (source (string-append (assoc-ref %build-inputs "source")))) + (setenv "PATH" path) + (mkdir-p bin) + (with-directory-excursion bin + (zero? (system* tar "xvf" source + "--strip-components=1" + "--no-anchored" + "bash-tap" + "bash-tap-bootstrap" + "bash-tap-mock"))))))) + (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.5.0