gnu: mafft: Wrap programs.

* gnu/packages/bioinformatics.scm (mafft)[arguments]: Add 'wrap-programs'
phase.
[propagated-inputs]: Move coreutils from here ...
[inputs]: ... to here.
This commit is contained in:
Ben Woodcroft 2016-08-15 20:46:43 +10:00
parent 93b8316e08
commit 101e8f7171
No known key found for this signature in database
GPG Key ID: E44DCCD146E0CCF4
1 changed files with 37 additions and 27 deletions

View File

@ -2974,31 +2974,31 @@ sequencing tag position and orientation.")
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'enter-dir (add-after 'unpack 'enter-dir
(lambda _ (chdir "core") #t)) (lambda _ (chdir "core") #t))
(add-after 'enter-dir 'patch-makefile (add-after 'enter-dir 'patch-makefile
(lambda _ (lambda _
;; on advice from the MAFFT authors, there is no need to ;; on advice from the MAFFT authors, there is no need to
;; distribute mafft-profile, mafft-distance, or ;; distribute mafft-profile, mafft-distance, or
;; mafft-homologs.rb as they are too "specialised". ;; mafft-homologs.rb as they are too "specialised".
(substitute* "Makefile" (substitute* "Makefile"
;; remove mafft-homologs.rb from SCRIPTS ;; remove mafft-homologs.rb from SCRIPTS
(("^SCRIPTS = mafft mafft-homologs.rb") (("^SCRIPTS = mafft mafft-homologs.rb")
"SCRIPTS = mafft") "SCRIPTS = mafft")
;; remove mafft-homologs from MANPAGES ;; remove mafft-homologs from MANPAGES
(("^MANPAGES = mafft.1 mafft-homologs.1") (("^MANPAGES = mafft.1 mafft-homologs.1")
"MANPAGES = mafft.1") "MANPAGES = mafft.1")
;; remove mafft-distance from PROGS ;; remove mafft-distance from PROGS
(("^PROGS = dvtditr dndfast7 dndblast sextet5 mafft-distance") (("^PROGS = dvtditr dndfast7 dndblast sextet5 mafft-distance")
"PROGS = dvtditr dndfast7 dndblast sextet5") "PROGS = dvtditr dndfast7 dndblast sextet5")
;; remove mafft-profile from PROGS ;; remove mafft-profile from PROGS
(("splittbfast disttbfast tbfast mafft-profile 2cl mccaskillwrap") (("splittbfast disttbfast tbfast mafft-profile 2cl mccaskillwrap")
"splittbfast disttbfast tbfast f2cl mccaskillwrap") "splittbfast disttbfast tbfast f2cl mccaskillwrap")
(("^rm -f mafft-profile mafft-profile.exe") "#") (("^rm -f mafft-profile mafft-profile.exe") "#")
(("^rm -f mafft-distance mafft-distance.exe") ")#") (("^rm -f mafft-distance mafft-distance.exe") ")#")
;; do not install MAN pages in libexec folder ;; do not install MAN pages in libexec folder
(("^\t\\$\\(INSTALL\\) -m 644 \\$\\(MANPAGES\\) \ (("^\t\\$\\(INSTALL\\) -m 644 \\$\\(MANPAGES\\) \
\\$\\(DESTDIR\\)\\$\\(LIBDIR\\)") "#")) \\$\\(DESTDIR\\)\\$\\(LIBDIR\\)") "#"))
#t)) #t))
(add-after 'enter-dir 'patch-paths (add-after 'enter-dir 'patch-paths
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* '("pairash.c" (substitute* '("pairash.c"
@ -3008,13 +3008,23 @@ sequencing tag position and orientation.")
(string-append prefix (which "awk"))) (string-append prefix (which "awk")))
(("grep") (which "grep"))) (("grep") (which "grep")))
#t)) #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 (inputs
`(("perl" ,perl) `(("perl" ,perl)
("gawk" ,gawk) ("gawk" ,gawk)
("grep" ,grep))) ("grep" ,grep)
(propagated-inputs ("coreutils" ,coreutils)))
`(("coreutils" ,coreutils)))
(home-page "http://mafft.cbrc.jp/alignment/software/") (home-page "http://mafft.cbrc.jp/alignment/software/")
(synopsis "Multiple sequence alignment program") (synopsis "Multiple sequence alignment program")
(description (description