Archived
1
0
Fork 0

gnu: ncbi-vdb: Ensure that vdb-sqlite is installed.

The most important change here is the addition of the 'install-libs phase.
All other changes are just the result of switching to G-expressions.

* gnu/packages/bioinformatics.scm (ncbi-vdb)[arguments]: Add 'install-libs
phase; use G-expression; drop trailing #T from build phases.
[inputs]: Drop package labels.
This commit is contained in:
Ricardo Wurmus 2023-05-12 21:51:41 +02:00
parent 263f235cd0
commit 8ba3bf6564
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -7561,35 +7561,34 @@ simultaneously.")
"0m8hlxscidsfqm9x9fyi62q6lpf1dv5115kgjjgnrkl49q9c27m6")))) "0m8hlxscidsfqm9x9fyi62q6lpf1dv5115kgjjgnrkl49q9c27m6"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:parallel-build? #f ; not supported (list
#:parallel-build? #f ; not supported
#:tests? #f ; no "check" target #:tests? #f ; no "check" target
#:make-flags '("HAVE_HDF5=1") #:make-flags '(list "HAVE_HDF5=1")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
#;
(add-after 'unpack 'make-files-writable (add-after 'unpack 'make-files-writable
(lambda _ (for-each make-file-writable (find-files "." ".*")) #t)) (lambda _ (for-each make-file-writable (find-files "." ".*"))))
(add-before 'configure 'set-perl-search-path (add-before 'configure 'set-perl-search-path
(lambda _ (lambda _
;; Work around "dotless @INC" build failure. ;; Work around "dotless @INC" build failure.
(setenv "PERL5LIB" (setenv "PERL5LIB"
(string-append (getcwd) "/setup:" (string-append (getcwd) "/setup:"
(getenv "PERL5LIB"))) (getenv "PERL5LIB")))))
#t))
;; See https://github.com/ncbi/ncbi-vdb/issues/14 ;; See https://github.com/ncbi/ncbi-vdb/issues/14
(add-after 'unpack 'patch-krypto-flags (add-after 'unpack 'patch-krypto-flags
(lambda _ (lambda _
(substitute* "libs/krypto/Makefile" (substitute* "libs/krypto/Makefile"
(("-Wa,-march=generic64\\+aes") "") (("-Wa,-march=generic64\\+aes") "")
(("-Wa,-march=generic64\\+sse4") "")) (("-Wa,-march=generic64\\+sse4") ""))))
#t))
(replace 'configure (replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out")))
;; Override include path for libmagic ;; Override include path for libmagic
(substitute* "setup/package.prl" (substitute* "setup/package.prl"
(("name => 'magic', Include => '/usr/include'") (("name => 'magic', Include => '/usr/include'")
(string-append "name=> 'magic', Include => '" (string-append "name=> 'magic', Include => '"
(assoc-ref inputs "libmagic") #$(this-package-input "file")
"/include" "'"))) "/include" "'")))
;; Install kdf5 library (needed by sra-tools) ;; Install kdf5 library (needed by sra-tools)
@ -7604,56 +7603,57 @@ simultaneously.")
;; Override search path for ngs-java ;; Override search path for ngs-java
(substitute* "setup/package.prl" (substitute* "setup/package.prl"
(("/usr/local/ngs/ngs-java") (("/usr/local/ngs/ngs-java")
(assoc-ref inputs "java-ngs"))) #$(this-package-input "java-ngs")))
;; The 'configure' script doesn't recognize things like ;; The 'configure' script doesn't recognize things like
;; '--enable-fast-install'. ;; '--enable-fast-install'.
(invoke "./configure" (invoke "./configure"
(string-append "--build-prefix=" (getcwd) "/build") (string-append "--build-prefix=" (getcwd) "/build")
(string-append "--prefix=" (assoc-ref outputs "out")) (string-append "--prefix=" #$output)
(string-append "--debug") (string-append "--debug")
(string-append "--with-xml2-prefix=" (string-append "--with-xml2-prefix="
(assoc-ref inputs "libxml2")) #$(this-package-input "libxml2"))
(string-append "--with-ngs-sdk-prefix=" (string-append "--with-ngs-sdk-prefix="
(assoc-ref inputs "ngs-sdk")) #$(this-package-input "ngs-sdk"))
(string-append "--with-hdf5-prefix=" (string-append "--with-hdf5-prefix="
(assoc-ref inputs "hdf5"))) #$(this-package-input "hdf5")))))
#t)))
(add-after 'install 'install-interfaces (add-after 'install 'install-interfaces
(lambda* (#:key outputs #:allow-other-keys) (lambda _
;; Install interface libraries. On i686 the interface libraries ;; Install interface libraries. On i686 the interface libraries
;; are installed to "linux/gcc/i386", so we need to use the Linux ;; are installed to "linux/gcc/i386", so we need to use the Linux
;; architecture name ("i386") instead of the target system prefix ;; architecture name ("i386") instead of the target system prefix
;; ("i686"). ;; ("i686").
(mkdir (string-append (assoc-ref outputs "out") "/ilib")) (mkdir (string-append #$output "/ilib"))
(copy-recursively (string-append (copy-recursively (string-append
"build/ncbi-vdb/linux/gcc/" "build/ncbi-vdb/linux/gcc/"
,(platform-linux-architecture #$(platform-linux-architecture
(lookup-platform-by-target-or-system (lookup-platform-by-target-or-system
(or (%current-target-system) (or (%current-target-system)
(%current-system)))) (%current-system))))
"/rel/ilib") "/rel/ilib")
(string-append (assoc-ref outputs "out") (string-append #$output "/ilib"))
"/ilib"))
;; Install interface headers ;; Install interface headers
(copy-recursively "interfaces" (copy-recursively "interfaces"
(string-append (assoc-ref outputs "out") (string-append #$output "/include"))))
"/include")) (add-after 'install-interfaces 'install-libs
#t)) (lambda _
(copy-recursively (string-append
"build/ncbi-vdb/linux/gcc/"
#$(platform-linux-architecture
(lookup-platform-by-target-or-system
(or (%current-target-system)
(%current-system))))
"/rel/lib")
(string-append #$output "/lib"))))
;; These files are needed by sra-tools. ;; These files are needed by sra-tools.
(add-after 'install 'install-configuration-files (add-after 'install 'install-configuration-files
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((target (string-append (assoc-ref outputs "out") "/kfg"))) (let ((target (string-append #$output "/kfg")))
(mkdir target) (mkdir target)
(install-file "libs/kfg/default.kfg" target) (install-file "libs/kfg/default.kfg" target)
(install-file "libs/kfg/certs.kfg" target)) (install-file "libs/kfg/certs.kfg" target)))))))
#t)))))
(inputs (inputs
`(("libxml2" ,libxml2) (list file hdf5 java-ngs libxml2 ngs-sdk ))
("ngs-sdk" ,ngs-sdk)
("java-ngs" ,java-ngs)
("libmagic" ,file)
("hdf5" ,hdf5)))
(native-inputs (list perl)) (native-inputs (list perl))
;; NCBI-VDB requires SSE capability. ;; NCBI-VDB requires SSE capability.
(supported-systems '("i686-linux" "x86_64-linux")) (supported-systems '("i686-linux" "x86_64-linux"))