On 17/01/16 11:30, Ben Woodcroft wrote:
Hi,
There is a somewhat popular bioinformatics program muscle whose
download tgz is a tar bomb. The bomb moniker seems especially
appropriate here, since it made the gnu-build-system error out, and
patching gnu-build-system requires a lot of rebuilding. In the
attached patches
Oops, I wasn't coming off master, so those packages are not apply-able.
Attached is better.
>From 530d81289ef5cab7010209fe0604a82b73459e4c Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrust...@gmail.com>
Date: Sat, 16 Jan 2016 22:02:22 +1000
Subject: [PATCH 1/2] build: Accept source archives that do not contain a
directory.
* guix/build/gnu-build-system.scm (unpack): Do not attempt to change
directory after extracting archive if the archive does not contain any
directories.
---
guix/build/gnu-build-system.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index ff7646b..f1a84ef 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -142,7 +142,10 @@ working directory."
(and (if (string-suffix? ".zip" source)
(zero? (system* "unzip" source))
(zero? (system* "tar" "xvf" source)))
- (chdir (first-subdirectory ".")))))
+ (let ((subdirectory (first-subdirectory ".")))
+ (if subdirectory
+ (chdir (first-subdirectory "."))
+ #t)))))
;; See <http://bugs.gnu.org/17840>.
(define* (patch-usr-bin-file #:key native-inputs inputs
--
2.6.3
>From 567ddebd4f9a8d9e0b5681dae1ec639987c69064 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrust...@gmail.com>
Date: Sat, 16 Jan 2016 22:12:23 +1000
Subject: [PATCH 2/2] gnu: Add muscle.
* gnu/packages/bioinformatics.scm (muscle): New variable.
---
gnu/packages/bioinformatics.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 314d0ad..f9d8068 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2070,6 +2070,37 @@ RNA-Seq, the MISO model uses Bayesian inference to compute the probability
that a read originated from a particular isoform.")
(license license:gpl2)))
+(define-public muscle
+ (package
+ (name "muscle")
+ (version "3.8.1551")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://www.drive5.com/muscle/muscle_src_"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0bj8kj7sdizy3987zx6w7axihk40fk8rn76mpbqqjcnd64i5a367"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list "LDLIBS = -lm")
+ #:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "muscle" bin)))))))
+ (home-page "http://www.drive5.com/muscle")
+ (synopsis "Multiple sequence alignment program")
+ (description
+ "MUSCLE aims to be a fast and accurate multiple sequence
+alignment program for nucleotide and protein sequences.")
+ (license license:public-domain)))
+
(define-public orfm
(package
(name "orfm")
--
2.6.3