gnu: bamm: Fetch from git and use INVOKE.

* gnu/packages/bioinformatics.scm (bamm)[source]: Fetch from git.
[arguments]: Use INVOKE and return #T unconditionally.
This commit is contained in:
Ricardo Wurmus 2018-10-20 22:03:02 +02:00
parent 95758e2faf
commit c793f4d8fb
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -167,15 +167,16 @@ (define-public bamm
(name "bamm") (name "bamm")
(version "1.7.3") (version "1.7.3")
(source (origin (source (origin
(method url-fetch) (method git-fetch)
;; BamM is not available on pypi. ;; BamM is not available on pypi.
(uri (string-append (uri (git-reference
"https://github.com/Ecogenomics/BamM/archive/" (url "https://github.com/Ecogenomics/BamM.git")
version ".tar.gz")) (commit version)
(file-name (string-append name "-" version ".tar.gz")) (recursive? #t)))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1f35yxp4pc8aadsvbpg6r4kg2jh4fkjci0iby4iyljm6980sac0s")) "1p83ahi984ipslxlg4yqy1gdnya9rkn1v71z8djgxkm9d2chw4c5"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
`(begin `(begin
@ -197,11 +198,12 @@ (define-public bamm
(lambda _ (lambda _
(with-directory-excursion "c" (with-directory-excursion "c"
(let ((sh (which "sh"))) (let ((sh (which "sh")))
(for-each make-file-writable (find-files "." ".*"))
;; Use autogen so that 'configure' works. ;; Use autogen so that 'configure' works.
(substitute* "autogen.sh" (("/bin/sh") sh)) (substitute* "autogen.sh" (("/bin/sh") sh))
(setenv "CONFIG_SHELL" sh) (setenv "CONFIG_SHELL" sh)
(substitute* "configure" (("/bin/sh") sh)) (invoke "./autogen.sh")))
(zero? (system* "./autogen.sh")))))) #t))
(delete 'build) (delete 'build)
;; Run tests after installation so compilation only happens once. ;; Run tests after installation so compilation only happens once.
(delete 'check) (delete 'check)
@ -229,7 +231,8 @@ (define-public bamm
;; There are 2 errors printed, but they are safe to ignore: ;; There are 2 errors printed, but they are safe to ignore:
;; 1) [E::hts_open_format] fail to open file ... ;; 1) [E::hts_open_format] fail to open file ...
;; 2) samtools view: failed to open ... ;; 2) samtools view: failed to open ...
(zero? (system* "nosetests"))))))) (invoke "nosetests")
#t)))))
(native-inputs (native-inputs
`(("autoconf" ,autoconf) `(("autoconf" ,autoconf)
("automake" ,automake) ("automake" ,automake)