- (let ((commit "5ac091365fdc716cc47cc5410bb97ee5dc2a2c92")
- (revision "1"))
- (package
- (name "vcflib")
- (version (git-version "0.0.0" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/vcflib/vcflib/")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "1gijvcz1lcdn5kvgzb671l6iby0379qk00nqmcrszgk67hfwx6kq"))))
- (build-system gnu-build-system)
- (inputs
- `(("zlib" ,zlib)))
- (native-inputs
- `(("perl" ,perl)
- ("python" ,python-2)
- ;; Submodules.
- ;; This package builds against the .o files so we need to extract the source.
- ("tabixpp-src" ,(package-source tabixpp-freebayes))
- ("smithwaterman-src" ,(package-source smithwaterman))
- ("multichoose-src" ,(package-source multichoose))
- ("fsom-src" ,(package-source fsom))
- ("filevercmp-src" ,(package-source filevercmp))
- ("fastahack-src" ,(package-source fastahack))
- ("intervaltree-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ekg/intervaltree/")
- (commit "dbb4c513d1ad3baac516fc1484c995daf9b42838")))
- (file-name "intervaltree-src-checkout")
- (sha256
- (base32 "1fy5qbj4bg8d2bjysvaa9wfnqn2rj2sk5yra2h4l5pzvy53f23fj"))))))
- (arguments
- `(#:tests? #f ; no tests
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'check)
- (add-after 'unpack 'unpack-submodule-sources
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((unpack (lambda (source target)
- (with-directory-excursion target
- (if (file-is-directory? (assoc-ref inputs source))
- (copy-recursively (assoc-ref inputs source) ".")
- (invoke "tar" "xvf"
- (assoc-ref inputs source)
- "--strip-components=1"))))))
- (and
- (unpack "intervaltree-src" "intervaltree")
- (unpack "fastahack-src" "fastahack")
- (unpack "filevercmp-src" "filevercmp")
- (unpack "fsom-src" "fsom")
- (unpack "multichoose-src" "multichoose")
- (unpack "smithwaterman-src" "smithwaterman")
- (unpack "tabixpp-src" "tabixpp")))))
- (replace 'build
- (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (package
+ (name "vcflib")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/vcflib/vcflib/releases/"
+ "download/v" version
+ "/vcflib-" version "-src.tar.gz"))
+ (sha256
+ (base32 "14zzrg8hg8cq9cvq2wdvp21j7nmxxkjrbagw2apd2yqv2kyx42lm"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file-recursively
+ '("fastahack" "filevercmp" "fsom" "googletest" "intervaltree"
+ "libVCFH" "multichoose" "smithwaterman" "tabixpp"))
+ #t))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("htslib" ,htslib)
+ ("perl" ,perl)
+ ("python" ,python)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(;; Submodules.
+ ;; This package builds against the .o files so we need to extract the source.
+ ("fastahack-src" ,(package-source fastahack))
+ ("filevercmp-src" ,(package-source filevercmp))
+ ("fsom-src" ,(package-source fsom))
+ ("intervaltree-src" ,(package-source intervaltree))
+ ("multichoose-src" ,(package-source multichoose))
+ ("smithwaterman-src" ,(package-source smithwaterman))
+ ("tabixpp-src" ,(package-source tabixpp))))
+ (arguments
+ `(#:tests? #f ; no tests
+ #:make-flags (list (string-append "HTS_LIB="
+ (assoc-ref %build-inputs "htslib")
+ "/lib/libhts.a")
+ (string-append "HTS_INCLUDES= -I"
+ (assoc-ref %build-inputs "htslib")
+ "/include/htslib")
+ (string-append "HTS_LDFLAGS= -L"
+ (assoc-ref %build-inputs "htslib")
+ "/include/htslib" " -lhts"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check)
+ (add-after 'unpack 'unpack-submodule-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((unpack (lambda (source target)
+ (mkdir target)
+ (with-directory-excursion target
+ (if (file-is-directory? (assoc-ref inputs source))
+ (copy-recursively (assoc-ref inputs source) ".")
+ (invoke "tar" "xvf"
+ (assoc-ref inputs source)
+ "--strip-components=1"))))))
+ (and
+ (unpack "fastahack-src" "fastahack")
+ (unpack "filevercmp-src" "filevercmp")
+ (unpack "fsom-src" "fsom")
+ (unpack "intervaltree-src" "intervaltree")
+ (unpack "multichoose-src" "multichoose")
+ (unpack "smithwaterman-src" "smithwaterman")
+ (unpack "tabixpp-src" "tabixpp")))))
+ (replace 'build
+ (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (let ((htslib (assoc-ref inputs "htslib")))