From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH 2/4] gnu: Add ncbi-tools. Date: Sat, 03 Dec 2016 20:19:33 +0100 Message-ID: <87a8cces6y.fsf@elephly.net> References: <20161203103901.27770-1-donttrustben@gmail.com> <20161203103901.27770-2-donttrustben@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDFrF-00073e-Fh for guix-devel@gnu.org; Sat, 03 Dec 2016 14:20:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDFrC-0003qM-9u for guix-devel@gnu.org; Sat, 03 Dec 2016 14:20:25 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cDFrC-0003pz-1D for guix-devel@gnu.org; Sat, 03 Dec 2016 14:20:22 -0500 In-reply-to: <20161203103901.27770-2-donttrustben@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ben Woodcroft Cc: guix-devel@gnu.org Hi Ben, thank you for the patch! > * gnu/packages/bioinformatics.scm (ncbi-tools): New variable. > --- > gnu/packages/bioinformatics.scm | 62 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 62 insertions(+) […] > + #:phases > + (modify-phases %standard-phases > + (delete 'configure) > + (add-after 'unpack 'patch-sources > + (lambda _ Indentation here is a little too far. The opening paren is usually aligned with the first “d” off “add-after”. > + (for-each (lambda (file) > + (substitute* file > + (("NCBI_MAKE_SHELL = .*") > + (string-append > + "NCBI_MAKE_SHELL = " > + (which "sh") > + "\n")))) > + (find-files "platform" ".*mk")) Here I’d use (substitute* (find-files "platform" ".*mk") …) “substitute*” can take a list of files. That’s nicer than using “for-each” here. > + (substitute* "make/ln-if-absent" > + (("set path=\\(/usr/bin /bin\\)") "")) > + #t)) > + (replace 'build > + (lambda _ Same as above; it’s a little too far to the right. > + (chdir "..") > + (zero? (system* "ncbi/make/makedis.csh")))) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) And the same here. > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin")) > + (man (string-append out "/share/man/man1"))) > + (for-each (lambda (file) > + (install-file > + (string-append "ncbi/build/" file) bin) > + (install-file > + (string-append "ncbi/doc/man/" file ".1") man)) > + ;; XXX: TODO: Install and test other binaries. > + (list "tbl2asn")) > + #t)))))) > + (native-inputs > + `(("csh" ,tcsh) > + ("pkg-config" ,pkg-config) > + ("coreutils" ,coreutils))) > + (home-page "https://www.ncbi.nlm.nih.gov/IEB/ToolBox/MainPage/index.html") > + (synopsis "NCBI-related tools") > + (description "The United States of America @dfn{National Center for > +Biotechnology Information} (NCBI) Software Development Toolkit is for the > +production and distribution of GenBank, Entrez, BLAST and related NCBI > +services.") > + (license license:public-domain))) > + Okay with these changes. Thank you! -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC http://elephly.net