gnu: krona-tools: Correct paths used internally.
* gnu/packages/web.scm (krona-tools)[arguments]: Add 'check' phase. Correct paths used internally.
This commit is contained in:
parent
40d71e44f5
commit
5d52ac7453
|
@ -291,8 +291,7 @@ parse JSON formatted strings back into the C representation of JSON objects.")
|
||||||
"1fj5mf6wbwz7v74n2safbw7fpw32fik19vf0wdbc2srn82i8fiwz"))))
|
"1fj5mf6wbwz7v74n2safbw7fpw32fik19vf0wdbc2srn82i8fiwz"))))
|
||||||
(build-system perl-build-system)
|
(build-system perl-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no tests
|
`(#:phases
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
;; There is no configure or build steps.
|
;; There is no configure or build steps.
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
|
@ -314,9 +313,7 @@ parse JSON formatted strings back into the C representation of JSON objects.")
|
||||||
(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"))
|
||||||
(perl (string-append (assoc-ref outputs "out")
|
(perl (string-append (assoc-ref outputs "out")
|
||||||
"/lib/perl5/site_perl"))
|
"/lib/perl5/site_perl/krona-tools/lib")))
|
||||||
(share (string-append
|
|
||||||
(assoc-ref outputs "out") "/share/krona-tools")))
|
|
||||||
(mkdir-p bin)
|
(mkdir-p bin)
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (script)
|
(lambda (script)
|
||||||
|
@ -341,13 +338,13 @@ parse JSON formatted strings back into the C representation of JSON objects.")
|
||||||
"ImportTaxonomy"
|
"ImportTaxonomy"
|
||||||
"ImportText"
|
"ImportText"
|
||||||
"ImportXML"))
|
"ImportXML"))
|
||||||
(mkdir-p share)
|
(copy-recursively "data" (string-append perl "/../data"))
|
||||||
(copy-recursively "data" (string-append share "/data"))
|
(copy-recursively "img" (string-append perl "/../img"))
|
||||||
(copy-recursively "img" (string-append share "/img"))
|
(copy-recursively "taxonomy" (string-append perl "/../taxonomy"))
|
||||||
(copy-recursively "taxonomy" (string-append share "/taxonomy"))
|
(install-file "src/krona-2.0.js" (string-append perl "/../src"))
|
||||||
(substitute* '("lib/KronaTools.pm")
|
(substitute* "lib/KronaTools.pm"
|
||||||
(("taxonomyDir = \".libPath/../taxonomy\"")
|
(("`ktGetLibPath`")
|
||||||
(string-append "taxonomyDir = \"" share "/taxonomy\"")))
|
(string-append "\"" perl "\"")))
|
||||||
(install-file "lib/KronaTools.pm" perl))))
|
(install-file "lib/KronaTools.pm" perl))))
|
||||||
(add-after 'install 'wrap-program
|
(add-after 'install 'wrap-program
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
@ -357,8 +354,14 @@ parse JSON formatted strings back into the C representation of JSON objects.")
|
||||||
(lambda (executable)
|
(lambda (executable)
|
||||||
(wrap-program executable
|
(wrap-program executable
|
||||||
`("PERL5LIB" ":" prefix
|
`("PERL5LIB" ":" prefix
|
||||||
(,(string-append out "/lib/perl5/site_perl")))))
|
(,(string-append out "/lib/perl5/site_perl/krona-tools/lib")))))
|
||||||
(find-files (string-append out "/bin/") ".*"))))))))
|
(find-files (string-append out "/bin/") ".*")))))
|
||||||
|
(delete 'check)
|
||||||
|
(add-after 'wrap-program 'check
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(with-directory-excursion "data"
|
||||||
|
(zero? (system* (string-append (assoc-ref outputs "out") "/bin/ktImportText")
|
||||||
|
"ec.tsv"))))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("perl" ,perl)))
|
`(("perl" ,perl)))
|
||||||
(home-page "https://github.com/marbl/Krona/wiki")
|
(home-page "https://github.com/marbl/Krona/wiki")
|
||||||
|
|
Loading…
Reference in New Issue