gnu: vcflib: Update to 1.0.9.

* gnu/packages/bioinformatics.scm (vcflib): Update to 1.0.9.
[source]: Update snippet.
[inputs]: Add curl, pybind11, and wfa2-lib.
[arguments]: Adjust and reformat.
This commit is contained in:
Ricardo Wurmus 2023-04-25 18:51:26 +02:00
parent 4ad51f5914
commit 2c09cc19e6
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -17170,7 +17170,7 @@ (define-public wfa2-lib
(define-public vcflib (define-public vcflib
(package (package
(name "vcflib") (name "vcflib")
(version "1.0.3") (version "1.0.9")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -17179,7 +17179,7 @@ (define-public vcflib
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "1r7pnajg997zdjkf1b38m14v0zqnfx52w7nbldwh1xpbpahb1hjh")) (base32 "0cmznzq7hl5vr504ww262rwz5lfdfrca5ksbcvwh3cgp44fiwykv"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
#~(begin #~(begin
@ -17199,19 +17199,20 @@ (define-public vcflib
(("\"SmithWatermanGotoh.h\"") "<smithwaterman/SmithWatermanGotoh.h>") (("\"SmithWatermanGotoh.h\"") "<smithwaterman/SmithWatermanGotoh.h>")
(("\"convert.h\"") "<smithwaterman/convert.h>") (("\"convert.h\"") "<smithwaterman/convert.h>")
(("\"disorder.h\"") "<smithwaterman/disorder.h>") (("\"disorder.h\"") "<smithwaterman/disorder.h>")
(("Fasta.h") "fastahack/Fasta.h")) (("\"wavefront/wfa.hpp\"") "<wavefront/wfa.hpp>")
(for-each delete-file-recursively (("Fasta.h") "fastahack/Fasta.h"))))))
'("fastahack" "filevercmp" "fsom" "googletest" "intervaltree"
"libVCFH" "multichoose" "smithwaterman"))))))
(build-system cmake-build-system) (build-system cmake-build-system)
(inputs (inputs
(list bzip2 (list bzip2
curl
htslib htslib
fastahack fastahack
perl perl
python python
pybind11
smithwaterman smithwaterman
tabixpp tabixpp
wfa2-lib
xz xz
zlib)) zlib))
(native-inputs (native-inputs
@ -17223,25 +17224,35 @@ (define-public vcflib
("intervaltree-src" ,(package-source intervaltree)) ("intervaltree-src" ,(package-source intervaltree))
("multichoose-src" ,(package-source multichoose)))) ("multichoose-src" ,(package-source multichoose))))
(arguments (arguments
(list #:configure-flags (list
#~(list (string-append #:configure-flags
"-DPKG_CONFIG_EXECUTABLE=" #~(list "-DZIG=OFF"
"-DTABIXPP_LOCAL=OFF"
"-DTABIX_FOUND=ON"
"-DWFA_GITMODULE=OFF"
"-DWFA_LINK_LIBRARIES=-lwfa2cpp"
(string-append "-DPKG_CONFIG_EXECUTABLE="
(search-input-file (search-input-file
%build-inputs (string-append %build-inputs (string-append
"/bin/" #$(pkg-config-for-target))))) "/bin/" #$(pkg-config-for-target)))))
#:tests? #f ; no tests #:tests? #f ; no tests
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'find-wf2lib-headers
(lambda _
(setenv "CPLUS_INCLUDE_PATH"
(string-append
#$(this-package-input "wfa2-lib")
"/include/wfa2lib:"
(or (getenv "CPLUS_INCLUDE_PATH") "")))))
(add-after 'unpack 'build-shared-library (add-after 'unpack 'build-shared-library
(lambda _ (lambda _
(substitute* "CMakeLists.txt" (substitute* "CMakeLists.txt"
(("vcflib STATIC") "vcflib SHARED")) (("vcflib STATIC") "vcflib SHARED"))))
(substitute* "test/Makefile"
(("libvcflib.a") "libvcflib.so"))))
(add-after 'unpack 'unpack-submodule-sources (add-after 'unpack 'unpack-submodule-sources
(lambda* (#:key inputs native-inputs #:allow-other-keys) (lambda* (#:key inputs native-inputs #:allow-other-keys)
(let ((unpack (lambda (source target) (let ((unpack (lambda (source target)
(mkdir target) (mkdir-p target)
(with-directory-excursion target (with-directory-excursion target
(let ((source (or (assoc-ref inputs source) (let ((source (or (assoc-ref inputs source)
(assoc-ref native-inputs source)))) (assoc-ref native-inputs source))))
@ -17251,30 +17262,30 @@ (define-public vcflib
source source
"--strip-components=1"))))))) "--strip-components=1")))))))
(and (and
(unpack "filevercmp-src" "filevercmp") (unpack "filevercmp-src" "contrib/filevercmp")
(unpack "fsom-src" "fsom") (unpack "fsom-src" "contrib/fsom")
(unpack "intervaltree-src" "intervaltree") (unpack "intervaltree-src" "contrib/intervaltree")
(unpack "multichoose-src" "multichoose"))))) (unpack "multichoose-src" "contrib/multichoose")))))
;; This pkg-config file is provided by other distributions. ;; This pkg-config file is provided by other distributions.
(add-after 'install 'install-pkg-config-file (add-after 'install 'install-pkg-config-file
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let ((pkgconfig (string-append #$output "/lib/pkgconfig")))
(pkgconfig (string-append out "/lib/pkgconfig")))
(mkdir-p pkgconfig) (mkdir-p pkgconfig)
(with-output-to-file (string-append pkgconfig "/vcflib.pc") (with-output-to-file (string-append pkgconfig "/vcflib.pc")
(lambda _ (lambda _
(format #t "prefix=~a~@ (format #t "\
exec_prefix=${prefix}~@ prefix=~a~@
libdir=${exec_prefix}/lib~@ exec_prefix=${prefix}~@
includedir=${prefix}/include~@ libdir=${exec_prefix}/lib~@
~@ includedir=${prefix}/include~@
Name: vcflib~@ ~@
Version: ~a~@ Name: vcflib~@
Requires: smithwaterman, fastahack, tabixpp~@ Version: ~a~@
Description: C++ library for parsing and manipulating VCF files~@ Requires: smithwaterman, fastahack, tabixpp~@
Libs: -L${libdir} -lvcflib~@ Description: C++ library for parsing and manipulating VCF files~@
Cflags: -I${includedir}~%" Libs: -L${libdir} -lvcflib~@
out #$version))))))))) Cflags: -I${includedir}~%"
#$output #$version)))))))))
(home-page "https://github.com/vcflib/vcflib/") (home-page "https://github.com/vcflib/vcflib/")
(synopsis "Library for parsing and manipulating VCF files") (synopsis "Library for parsing and manipulating VCF files")
(description "Vcflib provides methods to manipulate and interpret (description "Vcflib provides methods to manipulate and interpret