gnu: samtools: Use "modify-phases" syntax.

* gnu/packages/bioinformatics.scm (samtools)[arguments]: Use "modify-phases"
syntax.
master
Ben Woodcroft 2017-04-06 22:27:23 +10:00
parent c62d1a6e6c
commit c842d42593
No known key found for this signature in database
GPG Key ID: 2A6AD9F4AAC20DF6
1 changed files with 19 additions and 22 deletions

View File

@ -4533,29 +4533,26 @@ to the user's query of interest.")
#:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))) #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
#:configure-flags (list "--with-ncurses") #:configure-flags (list "--with-ncurses")
#:phases #:phases
(alist-cons-after (modify-phases %standard-phases
'unpack 'patch-tests (add-after 'unpack 'patch-tests
(lambda _ (lambda _
(substitute* "test/test.pl" (substitute* "test/test.pl"
;; The test script calls out to /bin/bash ;; The test script calls out to /bin/bash
(("/bin/bash") (which "bash"))) (("/bin/bash") (which "bash")))
#t)
(alist-cons-after
'install 'install-library
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (string-append (assoc-ref outputs "out") "/lib")))
(install-file "libbam.a" lib)
#t)) #t))
(alist-cons-after (add-after 'install 'install-library
'install 'install-headers (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
(let ((include (string-append (assoc-ref outputs "out") (install-file "libbam.a" lib)
"/include/samtools/"))) #t)))
(for-each (lambda (file) (add-after 'install 'install-headers
(install-file file include)) (lambda* (#:key outputs #:allow-other-keys)
(scandir "." (lambda (name) (string-match "\\.h$" name)))) (let ((include (string-append (assoc-ref outputs "out")
#t)) "/include/samtools/")))
%standard-phases))))) (for-each (lambda (file)
(install-file file include))
(scandir "." (lambda (name) (string-match "\\.h$" name))))
#t))))))
(native-inputs `(("pkg-config" ,pkg-config))) (native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("ncurses" ,ncurses) (inputs `(("ncurses" ,ncurses)
("perl" ,perl) ("perl" ,perl)