guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: mafft: Wrap programs.


From: Ben Woodcroft
Subject: 02/02: gnu: mafft: Wrap programs.
Date: Mon, 15 Aug 2016 10:51:40 +0000 (UTC)

benwoodcroft pushed a commit to branch master
in repository guix.

commit 101e8f717130339247b4d4abe63a4df379becdea
Author: Ben Woodcroft <address@hidden>
Date:   Mon Aug 15 20:46:43 2016 +1000

    gnu: mafft: Wrap programs.
    
    * gnu/packages/bioinformatics.scm (mafft)[arguments]: Add 'wrap-programs'
    phase.
    [propagated-inputs]: Move coreutils from here ...
    [inputs]: ... to here.
---
 gnu/packages/bioinformatics.scm |   64 ++++++++++++++++++++++-----------------
 1 file changed, 37 insertions(+), 27 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index b29ee0b..5ee881f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2974,31 +2974,31 @@ sequencing tag position and orientation.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'enter-dir
-          (lambda _ (chdir "core") #t))
+           (lambda _ (chdir "core") #t))
          (add-after 'enter-dir 'patch-makefile
-          (lambda _
-            ;; on advice from the MAFFT authors, there is no need to
-            ;; distribute mafft-profile, mafft-distance, or
-            ;; mafft-homologs.rb as they are too "specialised".
-            (substitute* "Makefile"
-              ;; 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")
-              ;; remove mafft-profile from PROGS
-              (("splittbfast disttbfast tbfast mafft-profile 2cl 
mccaskillwrap")
-               "splittbfast disttbfast tbfast f2cl mccaskillwrap")
-              (("^rm -f mafft-profile mafft-profile.exe") "#")
-              (("^rm -f mafft-distance mafft-distance.exe") ")#")
-              ;; do not install MAN pages in libexec folder
-              (("^\t\\$\\(INSTALL\\) -m 644 \\$\\(MANPAGES\\) \
+           (lambda _
+             ;; on advice from the MAFFT authors, there is no need to
+             ;; distribute mafft-profile, mafft-distance, or
+             ;; mafft-homologs.rb as they are too "specialised".
+             (substitute* "Makefile"
+               ;; 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")
+               ;; remove mafft-profile from PROGS
+               (("splittbfast disttbfast tbfast mafft-profile 2cl 
mccaskillwrap")
+                "splittbfast disttbfast tbfast f2cl mccaskillwrap")
+               (("^rm -f mafft-profile mafft-profile.exe") "#")
+               (("^rm -f mafft-distance mafft-distance.exe") ")#")
+               ;; do not install MAN pages in libexec folder
+               (("^\t\\$\\(INSTALL\\) -m 644 \\$\\(MANPAGES\\) \
 \\$\\(DESTDIR\\)\\$\\(LIBDIR\\)") "#"))
-            #t))
+             #t))
          (add-after 'enter-dir 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* '("pairash.c"
@@ -3008,13 +3008,23 @@ sequencing tag position and orientation.")
                 (string-append prefix (which "awk")))
                (("grep") (which "grep")))
              #t))
-         (delete 'configure))))
+         (delete 'configure)
+         (add-after 'install 'wrap-programs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (path (string-append
+                           (assoc-ref %build-inputs "coreutils") "/bin:")))
+               (for-each (lambda (file)
+                           (wrap-program file
+                             `("PATH" ":" prefix (,path))))
+                         (find-files bin)))
+             #t)))))
     (inputs
      `(("perl" ,perl)
        ("gawk" ,gawk)
-       ("grep" ,grep)))
-    (propagated-inputs
-     `(("coreutils" ,coreutils)))
+       ("grep" ,grep)
+       ("coreutils" ,coreutils)))
     (home-page "http://mafft.cbrc.jp/alignment/software/";)
     (synopsis "Multiple sequence alignment program")
     (description



reply via email to

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