From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] Add FastTree Date: Sun, 21 Jun 2015 09:12:07 +1000 Message-ID: <5585F347.5060004@uq.edu.au> References: <5583C3A2.1080906@uq.edu.au> <87oakcqa4r.fsf@gmail.com> <55849800.30201@uq.edu.au> <5584FAF9.8090902@uq.edu.au> <87zj3u9u4r.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010205090504080008070406" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6Rw5-0006Rr-D5 for guix-devel@gnu.org; Sat, 20 Jun 2015 19:12:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6Rvz-0000po-Ed for guix-devel@gnu.org; Sat, 20 Jun 2015 19:12:29 -0400 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:35318 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6Rvy-0000oz-P5 for guix-devel@gnu.org; Sat, 20 Jun 2015 19:12:23 -0400 In-Reply-To: <87zj3u9u4r.fsf@netris.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org, Alex Kost This is a multi-part message in MIME format. --------------010205090504080008070406 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 21/06/15 03:17, Mark H Weaver wrote: > Hi Ben, > > Instead of using 'trivial-build-system' for this, it would be better to > use 'gnu-build-system' and remove/replace the phases that aren't > appropriate. So, you'll probably want to remove the 'configure' phase > and replace the 'build' and 'install' phases. > > Even so, there are many important phases and implicit inputs in > 'gnu-build-system', notably setting the environment variables before the > build, and checking for missing rpaths in the installed binaries. > > As you have it now, since you used bare 'binutils' and not our > 'ld-wrapper' package, and you didn't add explicit rpaths options to the > linker, I guess that the produced executable won't be able to find the > specific shared libraries it was linked against without more help. I'm sure you are right, though I tried a few things and cannot get it to fail. Is there a way to ensure there is nothing amiss? Updated patch attached. In answer to my own question > During development of this patch I noticed badly specified system* does not throw an error - is there a way to do this so? One way is to replace system* with (zero? (system* with that being the return value of the lambda - there's an example in the attached patch. --------------010205090504080008070406 Content-Type: text/x-patch; name="0001-gnu-Add-fasttree.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-Add-fasttree.patch" >From d18f50e17547fa741569be109b31ef13c79b3d97 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sun, 21 Jun 2015 09:02:26 +1000 Subject: [PATCH] gnu: Add fasttree * gnu/packages/bioinformatics.scm (fasttree): New variable. --- gnu/packages/bioinformatics.scm | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 12c9175..0aacce7 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -780,6 +780,66 @@ analysis (from RNA-Seq), transcription factor binding quantification in ChIP-Seq, and analysis of metagenomic data.") (license license:artistic2.0))) +(define-public fasttree + (package + (name "fasttree") + (version "2.1.8") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.microbesonline.org/fasttree/FastTree-" + version ".c" + )) + (sha256 + (base32 + "0dzqc9vr9iiiw21y159xfjl2z90vw0y7r4x6456pcaxiy5hd2wmi")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no "check" target + #:phases + (modify-phases %standard-phases + (delete 'unpack) + (delete 'configure) + (replace 'build + (lambda* (#:key source #:allow-other-keys) + (and (zero? (system* "gcc" + "-O3" + "-finline-functions" + "-funroll-loops" + "-Wall" + "-o" + "FastTree" + source + "-lm")) + (zero? (system* "gcc" + "-DOPENMP" + "-fopenmp" + "-O3" + "-finline-functions" + "-funroll-loops" + "-Wall" + "-o" + "FastTreeMP" + source + "-lm"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") + "/bin"))) + (mkdir-p bin) + (copy-file "FastTree" + (string-append bin "/FastTree")) + (copy-file "FastTreeMP" + (string-append bin "/FastTreeMP")) + #t)))))) + (home-page "http://www.microbesonline.org/fasttree") + (synopsis "Infers approximately-maximum-likelihood phylogenetic trees") + (description + "FastTree can handle alignments with up to a million of sequences in a +reasonable amount of time and memory. For large alignments, FastTree is +100-1,000 times faster than PhyML 3.0 or RAxML 7.") + (license license:gpl2+))) + (define-public fastx-toolkit (package (name "fastx-toolkit") -- 2.1.4 --------------010205090504080008070406--