diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-04-28 10:15:43 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-04-28 10:18:07 +0200 |
commit | ffd5bc9600db50d5ffa7347f1aee8ee106db732d (patch) | |
tree | 7b8972eb991cf30dab2f0509a636c431e396424e /gnu/packages | |
parent | fe28f395bc2271ecc1221d4ba30c237c2368d9dc (diff) | |
download | guix-ffd5bc9600db50d5ffa7347f1aee8ee106db732d.tar.gz guix-ffd5bc9600db50d5ffa7347f1aee8ee106db732d.zip |
gnu: krona-tools: Install download scripts.
* gnu/packages/web.scm (krona-tools)[inputs]: Add curl and make.
[arguments]: Patch and install update scripts to /share.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/web.scm | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 663ca417cd..35558b64c7 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1198,11 +1198,13 @@ efficiently. It gives the application developer no more than 4 methods.") (lambda* (#:key outputs #:allow-other-keys) (let ((bin (string-append (assoc-ref outputs "out") "/bin")) (perl (string-append (assoc-ref outputs "out") - "/lib/perl5/site_perl/krona-tools/lib"))) + "/lib/perl5/site_perl/krona-tools/lib")) + (share (string-append (assoc-ref outputs "out") + "/share/krona-tools"))) (mkdir-p bin) (for-each (lambda (script) - (let* ((executable (string-append "scripts/" script ".pl"))) + (let ((executable (string-append "scripts/" script ".pl"))) ;; Prefix executables with 'kt' as install script does. (copy-file executable (string-append bin "/kt" script)))) '("ClassifyBLAST" @@ -1230,7 +1232,32 @@ efficiently. It gives the application developer no more than 4 methods.") (copy-recursively directory (string-append perl "/../" directory))) (list "data" "img" "taxonomy" "src")) - (install-file "lib/KronaTools.pm" perl)))) + (install-file "lib/KronaTools.pm" perl) + + ;; Install downloaders + (substitute* "updateAccessions.sh" + (("ktPath=.*") (string-append "ktPath=" share "\n"))) + (substitute* "updateTaxonomy.sh" + (("ktPath=.*") (string-append "ktPath=" share "\n")) + (("command -v curl") + (string-append "command -v " (which "curl"))) + (("curl -s") + (string-append (which "curl") " -s")) + (("curl\\$timestring") + (string-append (which "curl") "$timestring")) + (("perl -M") + (string-append (which "perl") " -M")) + (("make ") + (string-append (which "make") " "))) + (for-each (lambda (file) + (install-file file (string-append share "/scripts"))) + '("scripts/extractTaxonomy.pl" + "scripts/accession2taxid.make" + "scripts/taxonomy.make")) + (for-each (lambda (file) + (install-file file share)) + '("updateAccessions.sh" + "updateTaxonomy.sh"))))) (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1248,7 +1275,9 @@ efficiently. It gives the application developer no more than 4 methods.") (invoke (string-append (assoc-ref outputs "out") "/bin/ktImportText") "ec.tsv"))))))) (inputs - `(("perl" ,perl))) + `(("curl" ,curl) + ("make" ,gnu-make) + ("perl" ,perl))) (home-page "https://github.com/marbl/Krona/wiki") (synopsis "Hierarchical data exploration with zoomable HTML5 pie charts") (description |