* [PATCH] gnu: Add bash-tap.
@ 2016-03-17 16:08 Roel Janssen
2016-03-18 18:43 ` Leo Famulari
0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-03-17 16:08 UTC (permalink / raw)
To: guix-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-bash-tap.patch --]
[-- Type: text/x-patch, Size: 3080 bytes --]
From f50ae55cfd2edc513de33b2736f9c3a13cd43532 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
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
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
Dear Guix,
Here's a patch to add bash-tap. It is one of the dependencies for the
freebayes package which I'm currently revising.
Kind regards,
Roel Janssen
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-03-17 16:08 [PATCH] gnu: Add bash-tap Roel Janssen
@ 2016-03-18 18:43 ` Leo Famulari
2016-03-18 18:53 ` Andreas Enge
0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-03-18 18:43 UTC (permalink / raw)
To: Roel Janssen; +Cc: guix-devel
On Thu, Mar 17, 2016 at 05:08:11PM +0100, Roel Janssen wrote:
> From f50ae55cfd2edc513de33b2736f9c3a13cd43532 Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@gnu.org>
> Date: Thu, 17 Mar 2016 17:03:34 +0100
> Subject: [PATCH] gnu: Add bash-tap.
>
> * gnu/packages/bash.scm (bash-tap): New variable.
I don't have much experience with the trivial build system but overall
this patch looks good to me. The build process is simple and easy to
understand.
Can someone with more experience take a look and apply the patch if it's
okay?
If nobody does in a few days, I will go ahead and push.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-03-18 18:43 ` Leo Famulari
@ 2016-03-18 18:53 ` Andreas Enge
2016-03-18 19:15 ` Leo Famulari
2016-03-18 20:49 ` Ludovic Courtès
0 siblings, 2 replies; 8+ messages in thread
From: Andreas Enge @ 2016-03-18 18:53 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
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.
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-03-18 18:53 ` Andreas Enge
@ 2016-03-18 19:15 ` Leo Famulari
2016-05-03 10:44 ` Roel Janssen
2016-03-18 20:49 ` Ludovic Courtès
1 sibling, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-03-18 19:15 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
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.
>
> Andreas
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-03-18 18:53 ` Andreas Enge
2016-03-18 19:15 ` Leo Famulari
@ 2016-03-18 20:49 ` Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-03-18 20:49 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> skribis:
> 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.
Alternately, the builder could manually invoke the ‘patch-shebangs’
phase, which is a regular procedure:
(use-modules (guix build gnu-build-system))
((assoc-ref %standard-phases 'patch-shebangs) %build-inputs
%outputs)
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-03-18 19:15 ` Leo Famulari
@ 2016-05-03 10:44 ` Roel Janssen
2016-05-06 18:07 ` Leo Famulari
0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-05-03 10:44 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
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 <roel@gnu.org>
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-05-03 10:44 ` Roel Janssen
@ 2016-05-06 18:07 ` Leo Famulari
2016-05-07 17:12 ` Roel Janssen
0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-05-06 18:07 UTC (permalink / raw)
To: Roel Janssen; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
On Tue, May 03, 2016 at 12:44:57PM +0200, Roel Janssen wrote:
> * gnu/packages/bash.scm (bash-tap): New variable.
> + (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.
I think these comments don't fully describe the situation. How about
the comment in the attached patch?
[-- Attachment #2: 0001-gnu-Add-bash-tap.patch --]
[-- Type: text/x-diff, Size: 3165 bytes --]
From 2b850f2a2a05cab8c466be49173962ca13de843a Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Tue, 3 May 2016 12:44:57 +0200
Subject: [PATCH] gnu: Add bash-tap.
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 <roel@gnu.org>
Date: Tue, 3 May 2016 12:43:00 +0200
Subject: [PATCH] gnu: Add bash-tap.
* gnu/packages/bash.scm (bash-tap): New variable.
Signed-off-by: Leo Famulari <leo@famulari.name>
---
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: Add bash-tap.
2016-05-06 18:07 ` Leo Famulari
@ 2016-05-07 17:12 ` Roel Janssen
0 siblings, 0 replies; 8+ messages in thread
From: Roel Janssen @ 2016-05-07 17:12 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari writes:
> On Tue, May 03, 2016 at 12:44:57PM +0200, Roel Janssen wrote:
>> * gnu/packages/bash.scm (bash-tap): New variable.
>
>> + (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.
>
> I think these comments don't fully describe the situation. How about
> the comment in the attached patch?
Even though I'm not sure what comments you are exactly refering to, I
think this new patch should be better :)
Once again, thanks for your time! Here is the patch:
From f3d6252be65844c22716f388895fc0d82e96e123 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Sat, 7 May 2016 19:09:40 +0200
Subject: [PATCH] gnu: Add bash-tap.
* gnu/packages/bash.scm (bash-tap): New variable.
---
gnu/packages/bash.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index cad66da..c22005b 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -318,3 +318,45 @@ 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"))))
+ ;; There is no compilation process to use this package, however, the bash
+ ;; scripts installed by this package start with "#!/bin/bash". To fix
+ ;; these lines, we use the patch-shebangs of the GNU build system. The
+ ;; project does not use a Makefile.
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; There is no test suite.
+ #:phases
+ (modify-phases %standard-phases
+ ;; Because there is no configure scripts and no Makefile, we
+ ;; can remove these phases.
+ (delete 'configure)
+ (delete 'build)
+ ;; The installation involves manually copying the files to a location.
+ ;; To make them easily accessible by setting PATH, we add the scripts
+ ;; to the "bin" folder.
+ (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
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-05-07 17:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 16:08 [PATCH] gnu: Add bash-tap Roel Janssen
2016-03-18 18:43 ` Leo Famulari
2016-03-18 18:53 ` Andreas Enge
2016-03-18 19:15 ` Leo Famulari
2016-05-03 10:44 ` Roel Janssen
2016-05-06 18:07 ` Leo Famulari
2016-05-07 17:12 ` Roel Janssen
2016-03-18 20:49 ` Ludovic Courtès
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.