From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52014) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDk5b-0007k5-IT for guix-patches@gnu.org; Mon, 16 Mar 2020 03:23:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDk5a-0008Gc-4O for guix-patches@gnu.org; Mon, 16 Mar 2020 03:23:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58273) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDk5W-0008F3-Jx for guix-patches@gnu.org; Mon, 16 Mar 2020 03:23:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jDk5W-0001Sw-Fy for guix-patches@gnu.org; Mon, 16 Mar 2020 03:23:02 -0400 Subject: [bug#40086] [PATCH 11/11] gnu: edirect: Install more programs. References: <20200316070412.12364-1-efraim@flashner.co.il> In-Reply-To: <20200316070412.12364-1-efraim@flashner.co.il> Resent-Message-ID: From: Efraim Flashner Date: Mon, 16 Mar 2020 09:15:59 +0200 Message-Id: <20200316071559.13930-12-efraim@flashner.co.il> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40086@debbugs.gnu.org Cc: Efraim Flashner * 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. --- gnu/packages/bioinformatics.scm | 57 +++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 1f0619ebb6..da36733412 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2781,19 +2781,48 @@ quantitative phenotypes.") (delete 'configure) (delete 'build) (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 - (lambda* (#:key outputs #:allow-other-keys) - (install-file "edirect.pl" - (string-append (assoc-ref outputs "out") "/bin")) - #t)) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((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)) (add-after 'install 'wrap-program (lambda* (#:key outputs #:allow-other-keys) - ;; Make sure 'edirect.pl' finds all perl inputs at runtime. - (let* ((out (assoc-ref outputs "out")) + ;; Make sure everything can run in a pure environment. + (let ((out (assoc-ref outputs "out")) (path (getenv "PERL5LIB"))) - (wrap-program (string-append out "/bin/edirect.pl") - `("PERL5LIB" ":" prefix (,path)))) - #t)) + (for-each + (lambda (file) + (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 (lambda* (#:key outputs #:allow-other-keys) (invoke (string-append (assoc-ref outputs "out") @@ -2801,7 +2830,8 @@ quantitative phenotypes.") "-filter" "-help") #t))))) (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-file-listing" ,perl-file-listing) ("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 in structured XML format. This can eliminate the need for writing custom 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))) (define-public edirect-go-programs -- 2.25.1