guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update mafft to 7.245.


From: Ricardo Wurmus
Subject: Re: Update mafft to 7.245.
Date: Thu, 10 Dec 2015 17:16:09 +0100

Ben Woodcroft <address@hidden> writes:

> Two reviews in record time, nice.
>
> On 10/11/15 23:12, Efraim Flashner wrote:
>> On Tue, 10 Nov 2015 22:18:10 +1000
>> Ben Woodcroft <address@hidden> wrote:
>>
>>> Also had to fix the inputs. Hard not to notice these things in the
>>> environment container - worked well thanks.
>> Do they need to be propagated inputs? Did you try them as native-inputs?
>> Often that's enough to take care of it.
> The main program 'mafft' is actually a reasonably long shell script, 
> which itself calls awk, grep, perl, etc. collectively many times (>100 I 
> would guess). I think it is intended to be run where these programs are 
> available. I could do as Ricardo suggests and run substitute* but this 
> seems a bit error-prone and not very future-proof to me, especially when 
> the shell script is difficult to exhaustively test. WDYT?

I looked at the instances of “perl”, “awk”, and “grep” and they seem
manageable.  I didn’t test this but attached is a different version of
your patch that does what I suggested.  It might work.  Could you try to
confirm that it’s okay?

What do you think?

>From 7f52cd8576df7cb4355d3281ca0d00fc661a0221 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <address@hidden>
Date: Wed, 11 Nov 2015 08:04:55 +1000
Subject: [PATCH] gnu: mafft: Update to 7.245.

* gnu/packages/bioinformatics.scm (mafft): Update to 7.245.
[arguments]: Don't include mafft-homologs manpage.
[inputs]: Add gawk and grep.
[propagated-inputs]: Add coreutils.
---
 gnu/packages/bioinformatics.scm | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 64dd280..0a3de06 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages machine-learning)
@@ -1789,7 +1790,7 @@ sequencing tag position and orientation.")
 (define-public mafft
   (package
     (name "mafft")
-    (version "7.221")
+    (version "7.245")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1798,7 +1799,7 @@ sequencing tag position and orientation.")
               (file-name (string-append name "-" version ".tgz"))
               (sha256
                (base32
-                "0xi7klbsgi049vsrk6jiwh9wfj3b770gz3c8c7zwij448v0dr73d"))))
+                "0m1l7gdrmfxjw54d3a0g18w6rwqrra9w9zvxix7dcddw6d1qyir2"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no automated tests, though there are tests in the read me
@@ -1819,6 +1820,9 @@ sequencing tag position and orientation.")
               ;; remove mafft-homologs.rb from SCRIPTS
               (("^SCRIPTS = mafft mafft-homologs.rb")
                "SCRIPTS = mafft")
+              ;; remove mafft-homologs from MANPAGES
+              (("^MANPAGES = mafft.1 mafft-homologs.1")
+               "MANPAGES = mafft.1")
               ;; remove mafft-distance from PROGS
               (("^PROGS = dvtditr dndfast7 dndblast sextet5 mafft-distance")
                "PROGS = dvtditr dndfast7 dndblast sextet5")
@@ -1831,9 +1835,22 @@ sequencing tag position and orientation.")
               (("^\t\\$\\(INSTALL\\) -m 644 \\$\\(MANPAGES\\) \
 \\$\\(DESTDIR\\)\\$\\(LIBDIR\\)") "#"))
             #t))
+         (add-after 'enter-dir 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("pairash.c"
+                            "mafft.tmpl")
+               (("perl") (which "perl"))
+               (("(\"|`|\| )awk" _ prefix)
+                (string-append prefix (which "awk")))
+               (("grep") (which "grep")))
+             #t))
          (delete 'configure))))
     (inputs
-     `(("perl" ,perl)))
+     `(("perl" ,perl)
+       ("gawk" ,gawk)
+       ("grep" ,grep)))
+    (propagated-inputs
+     `(("coreutils" ,coreutils)))
     (home-page "http://mafft.cbrc.jp/alignment/software/";)
     (synopsis "Multiple sequence alignment program")
     (description
-- 
2.1.0

~~ Ricardo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]