gnu: freebayes: Simplify and enable tests.
* gnu/packages/bioinformatics.scm (freebayes)[arguments]: Enable tests; set make flags; add phase "fix-tests"; fix both Makefiles in "fix-makefiles" phase; move build of tabixpp and vcflib to separate phase "build-tabixpp-and-vcflib"; simplify make invocations; remove custom "build" phase.
This commit is contained in:
parent
7cd98e868e
commit
c2847323d8
|
@ -15159,11 +15159,20 @@ manipulations on VCF files.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga"))))))
|
(base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga"))))))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; TODO: Re-enable when we have grep with perl support.
|
`(#:make-flags
|
||||||
|
(list "CC=gcc"
|
||||||
|
(string-append "BAMTOOLS_ROOT="
|
||||||
|
(assoc-ref %build-inputs "bamtools")))
|
||||||
#:test-target "test"
|
#:test-target "test"
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
|
(add-after 'unpack 'fix-tests
|
||||||
|
(lambda _
|
||||||
|
(substitute* "test/t/01_call_variants.t"
|
||||||
|
(("grep -P \"\\(\\\\t500\\$\\|\\\\t11000\\$\\|\\\\t1000\\$\\)\"")
|
||||||
|
"grep -E ' (500|11000|1000)$'"))
|
||||||
|
#t))
|
||||||
(add-after 'unpack 'unpack-submodule-sources
|
(add-after 'unpack 'unpack-submodule-sources
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((unpack (lambda (source target)
|
(let ((unpack (lambda (source target)
|
||||||
|
@ -15184,32 +15193,29 @@ manipulations on VCF files.")
|
||||||
(unpack "tabixpp-src" "vcflib/tabixpp")
|
(unpack "tabixpp-src" "vcflib/tabixpp")
|
||||||
(unpack "test-simple-bash-src" "test/test-simple-bash")
|
(unpack "test-simple-bash-src" "test/test-simple-bash")
|
||||||
(unpack "bash-tap-src" "test/bash-tap")))))
|
(unpack "bash-tap-src" "test/bash-tap")))))
|
||||||
(add-after 'unpack-submodule-sources 'fix-makefile
|
(add-after 'unpack-submodule-sources 'fix-makefiles
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _
|
||||||
;; We don't have the .git folder to get the version tag from.
|
;; We don't have the .git folder to get the version tag from.
|
||||||
(substitute* '("vcflib/Makefile")
|
(substitute* "vcflib/Makefile"
|
||||||
(("^GIT_VERSION.*") (string-append "GIT_VERSION = v" ,version)))))
|
(("^GIT_VERSION.*")
|
||||||
(replace 'build
|
(string-append "GIT_VERSION = v" ,version)))
|
||||||
|
(substitute* "src/Makefile"
|
||||||
|
(("-I\\$\\(BAMTOOLS_ROOT\\)/src")
|
||||||
|
"-I$(BAMTOOLS_ROOT)/include/bamtools"))
|
||||||
|
#t))
|
||||||
|
(add-before 'build 'build-tabixpp-and-vcflib
|
||||||
(lambda* (#:key inputs make-flags #:allow-other-keys)
|
(lambda* (#:key inputs make-flags #:allow-other-keys)
|
||||||
(with-directory-excursion "vcflib"
|
(with-directory-excursion "vcflib"
|
||||||
(with-directory-excursion "tabixpp"
|
(with-directory-excursion "tabixpp"
|
||||||
(pk "Compile tabixpp before compiling the main project.")
|
(apply invoke "make"
|
||||||
(let ((htslib-ref (assoc-ref inputs "htslib")))
|
(string-append "HTS_LIB="
|
||||||
(invoke "make" "HTS_HEADERS="
|
(assoc-ref inputs "htslib")
|
||||||
(string-append "HTS_LIB=" htslib-ref "/lib/libhts.a")
|
"/lib/libhts.a")
|
||||||
(string-append "LIBPATH=-L. -L" htslib-ref "/include"))))
|
make-flags))
|
||||||
(pk "Compile vcflib before compiling the main project.")
|
(apply invoke "make"
|
||||||
(invoke "make" "CC=gcc"
|
(string-append "CFLAGS=-Itabixpp")
|
||||||
(string-append "CFLAGS=\"" "-Itabixpp "
|
"all"
|
||||||
"-I" (assoc-ref inputs "htslib") "/include " "\"")
|
make-flags))))
|
||||||
"all"))
|
|
||||||
(pk "Compile the main project.")
|
|
||||||
(with-directory-excursion "src"
|
|
||||||
(substitute* "Makefile"
|
|
||||||
(("-I\\$\\(BAMTOOLS_ROOT\\)/src") "-I$(BAMTOOLS_ROOT)/include/bamtools"))
|
|
||||||
(invoke "make"
|
|
||||||
(string-append "BAMTOOLS_ROOT="
|
|
||||||
(assoc-ref inputs "bamtools"))))))
|
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
|
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
|
||||||
|
|
Loading…
Reference in New Issue