gnu: edirect: Install more programs.
* gnu/packages/bioinformatics.scm (edirect)[arguments]: Add 'patch-programs phase to work around not finding binaries in the PATH. Rewrite 'install phase to install many more scripts. Rewrite 'wrap-program to wrap more scripts with more programs. [inputs]: Add edirect-go-programs. [native-search-paths]: New field.master
parent
7d13a94215
commit
10d3fbf051
|
@ -2781,19 +2781,48 @@ quantitative phenotypes.")
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
(delete 'build)
|
(delete 'build)
|
||||||
(delete 'check) ; simple check after install
|
(delete 'check) ; simple check after install
|
||||||
|
(add-after 'unpack 'patch-programs
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
;; Ignore errors about missing xtract.Linux and rchive.Linux.
|
||||||
|
(substitute* "pm-refresh"
|
||||||
|
(("cat \\\"\\$target")
|
||||||
|
"grep ^[[:digit:]] \"$target"))
|
||||||
|
#t))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(install-file "edirect.pl"
|
(let ((bin (string-append (assoc-ref outputs "out") "/bin"))
|
||||||
(string-append (assoc-ref outputs "out") "/bin"))
|
(edirect-go (assoc-ref inputs "edirect-go-programs")))
|
||||||
|
(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(install-file file bin))
|
||||||
|
'("archive-pubmed" "asp-cp" "asp-ls" "download-ncbi-data"
|
||||||
|
"download-pubmed" "edirect.pl" "efetch" "epost" "esearch"
|
||||||
|
"fetch-pubmed" "ftp-cp" "ftp-ls" "has-asp" "index-pubmed"
|
||||||
|
"pm-prepare" "pm-refresh" "pm-stash" "pm-collect"
|
||||||
|
"pm-index" "pm-invert" "pm-merge" "pm-promote"))
|
||||||
|
(symlink (string-append edirect-go "/bin/xtract.Linux")
|
||||||
|
(string-append bin "/xtract"))
|
||||||
|
(symlink (string-append edirect-go "/bin/rchive.Linux")
|
||||||
|
(string-append bin "/rchive")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'install 'wrap-program
|
(add-after 'install 'wrap-program
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; Make sure 'edirect.pl' finds all perl inputs at runtime.
|
;; Make sure everything can run in a pure environment.
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(path (getenv "PERL5LIB")))
|
(path (getenv "PERL5LIB")))
|
||||||
(wrap-program (string-append out "/bin/edirect.pl")
|
(for-each
|
||||||
`("PERL5LIB" ":" prefix (,path))))
|
(lambda (file)
|
||||||
#t))
|
(wrap-program file
|
||||||
|
`("PERL5LIB" ":" prefix (,path)))
|
||||||
|
(wrap-program file
|
||||||
|
`("PATH" ":" prefix (,(string-append out "/bin")
|
||||||
|
,(dirname (which "sed"))
|
||||||
|
,(dirname (which "gzip"))
|
||||||
|
,(dirname (which "grep"))
|
||||||
|
,(dirname (which "perl"))
|
||||||
|
,(dirname (which "uname"))))))
|
||||||
|
(find-files out ".")))
|
||||||
|
#t))
|
||||||
(add-after 'wrap-program 'check
|
(add-after 'wrap-program 'check
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(invoke (string-append (assoc-ref outputs "out")
|
(invoke (string-append (assoc-ref outputs "out")
|
||||||
|
@ -2801,7 +2830,8 @@ quantitative phenotypes.")
|
||||||
"-filter" "-help")
|
"-filter" "-help")
|
||||||
#t)))))
|
#t)))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("perl-html-parser" ,perl-html-parser)
|
`(("edirect-go-programs" ,edirect-go-programs)
|
||||||
|
("perl-html-parser" ,perl-html-parser)
|
||||||
("perl-encode-locale" ,perl-encode-locale)
|
("perl-encode-locale" ,perl-encode-locale)
|
||||||
("perl-file-listing" ,perl-file-listing)
|
("perl-file-listing" ,perl-file-listing)
|
||||||
("perl-html-tagset" ,perl-html-tagset)
|
("perl-html-tagset" ,perl-html-tagset)
|
||||||
|
@ -2831,6 +2861,13 @@ EDirect also provides an argument-driven function that simplifies the
|
||||||
extraction of data from document summaries or other results that are returned
|
extraction of data from document summaries or other results that are returned
|
||||||
in structured XML format. This can eliminate the need for writing custom
|
in structured XML format. This can eliminate the need for writing custom
|
||||||
software to answer ad hoc questions.")
|
software to answer ad hoc questions.")
|
||||||
|
(native-search-paths
|
||||||
|
;; Ideally this should be set for LWP somewhere.
|
||||||
|
(list (search-path-specification
|
||||||
|
(variable "PERL_LWP_SSL_CA_FILE")
|
||||||
|
(file-type 'regular)
|
||||||
|
(separator #f)
|
||||||
|
(files '("/etc/ssl/certs/ca-certificates.crt")))))
|
||||||
(license license:public-domain)))
|
(license license:public-domain)))
|
||||||
|
|
||||||
(define-public edirect-go-programs
|
(define-public edirect-go-programs
|
||||||
|
|
Reference in New Issue