gnu: Use INSTALL-FILE where appropriate.

* gnu/packages/admin.scm (wpa-supplicant-minimal): Substitute the simpler
INSTALL-FILE for COPY-FILE when invoked with redundant arguments.
* gnu/packages/bioinformatics.scm (couger, aragorn, express-beta-diversity,
edirect, fasttree, rsem, samtools-0.1): Likewise.
* gnu/packages/code.scm (withershins): Likewise.
* gnu/packages/conky.scm (conky): Likewise.
* gnu/packages/debug.scm (delta, american-fuzzy-lop): Likewise.
* gnu/packages/emacs.scm (emacs-mit-scheme-doc): Likewise.
* gnu/packages/engineering.scm (librecad): Likewise.
This commit is contained in:
Tobias Geerinckx-Rice 2017-03-13 16:19:06 +01:00
parent 618e4bfbad
commit f38607536e
No known key found for this signature in database
GPG Key ID: 91CCDB9B48541B99
7 changed files with 38 additions and 49 deletions

View File

@ -905,9 +905,7 @@ commands and their arguments.")
(man8 (string-append man "/man8"))) (man8 (string-append man "/man8")))
(define (copy-man-page target) (define (copy-man-page target)
(lambda (file) (lambda (file)
(copy-file file (install-file file target)))
(string-append target "/"
(basename file)))))
(mkdir-p man5) (mkdir man8) (mkdir-p man5) (mkdir man8)
(for-each (copy-man-page man5) (for-each (copy-man-page man5)

View File

@ -151,11 +151,9 @@ and several other tools.")
(bin (string-append out "/bin")) (bin (string-append out "/bin"))
(man (string-append out "/share/man/man1"))) (man (string-append out "/share/man/man1")))
(mkdir-p bin) (mkdir-p bin)
(copy-file "aragorn" (install-file "aragorn" bin)
(string-append bin "/aragorn"))
(mkdir-p man) (mkdir-p man)
(copy-file "aragorn.1" (install-file "aragorn.1" man))
(string-append man "/aragorn.1")))
#t))))) #t)))))
(home-page "http://mbio-serv2.mbioekol.lu.se/ARAGORN") (home-page "http://mbio-serv2.mbioekol.lu.se/ARAGORN")
(synopsis "Detect tRNA, mtRNA and tmRNA genes in nucleotide sequences") (synopsis "Detect tRNA, mtRNA and tmRNA genes in nucleotide sequences")
@ -1700,15 +1698,16 @@ gene predictor designed to work with assembled, aligned RNA-seq transcripts.")
(replace (replace
'install 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(copy-recursively "src" (string-append out "/src")) (copy-recursively "src" (string-append out "/src"))
(mkdir (string-append out "/bin")) (mkdir bin)
;; Add "src" directory to module lookup path. ;; Add "src" directory to module lookup path.
(substitute* "couger" (substitute* "couger"
(("from argparse") (("from argparse")
(string-append "import sys\nsys.path.append(\"" (string-append "import sys\nsys.path.append(\""
out "\")\nfrom argparse"))) out "\")\nfrom argparse")))
(copy-file "couger" (string-append out "/bin/couger"))) (install-file "couger" bin))
#t)) #t))
(add-after (add-after
'install 'wrap-program 'install 'wrap-program
@ -2231,8 +2230,7 @@ quantitative phenotypes.")
(let ((target (string-append (assoc-ref outputs "out") (let ((target (string-append (assoc-ref outputs "out")
"/bin"))) "/bin")))
(mkdir-p target) (mkdir-p target)
(copy-file "edirect.pl" (install-file "edirect.pl" target)
(string-append target "/edirect.pl"))
#t))) #t)))
(add-after (add-after
'install 'wrap-program 'install 'wrap-program
@ -2378,10 +2376,8 @@ ChIP-Seq, and analysis of metagenomic data.")
(let ((bin (string-append (assoc-ref outputs "out") (let ((bin (string-append (assoc-ref outputs "out")
"/bin"))) "/bin")))
(mkdir-p bin) (mkdir-p bin)
(copy-file "scripts/convertToEBD.py" (install-file "scripts/convertToEBD.py" bin)
(string-append bin "/convertToEBD.py")) (install-file "bin/ExpressBetaDiversity" bin)
(copy-file "bin/ExpressBetaDiversity"
(string-append bin "/ExpressBetaDiversity"))
#t)))))) #t))))))
(inputs (inputs
`(("python" ,python-2))) `(("python" ,python-2)))
@ -2440,10 +2436,8 @@ similarity of community members.")
(let ((bin (string-append (assoc-ref outputs "out") (let ((bin (string-append (assoc-ref outputs "out")
"/bin"))) "/bin")))
(mkdir-p bin) (mkdir-p bin)
(copy-file "FastTree" (install-file "FastTree" bin)
(string-append bin "/FastTree")) (install-file "FastTreeMP" bin)
(copy-file "FastTreeMP"
(string-append bin "/FastTreeMP"))
#t)))))) #t))))))
(home-page "http://www.microbesonline.org/fasttree") (home-page "http://www.microbesonline.org/fasttree")
(synopsis "Infers approximately-maximum-likelihood phylogenetic trees") (synopsis "Infers approximately-maximum-likelihood phylogenetic trees")
@ -4101,11 +4095,9 @@ phylogenies.")
(mkdir-p bin) (mkdir-p bin)
(mkdir-p perl) (mkdir-p perl)
(for-each (lambda (file) (for-each (lambda (file)
(copy-file file (install-file file bin))
(string-append bin (basename file))))
(find-files "." "rsem-.*")) (find-files "." "rsem-.*"))
(copy-file "rsem_perl_utils.pm" (install-file "rsem_perl_utils.pm" perl))
(string-append perl "/rsem_perl_utils.pm")))
#t)) #t))
(add-after (add-after
'install 'wrap-program 'install 'wrap-program
@ -4336,8 +4328,7 @@ viewer.")
(let ((bin (string-append (let ((bin (string-append
(assoc-ref outputs "out") "/bin"))) (assoc-ref outputs "out") "/bin")))
(mkdir-p bin) (mkdir-p bin)
(copy-file "samtools" (install-file "samtools" bin)
(string-append bin "/samtools"))
#t))) #t)))
(delete 'patch-tests) (delete 'patch-tests)
(delete 'configure)))))))) (delete 'configure))))))))

View File

@ -271,13 +271,13 @@ features that are not supported by the standard @code{stdio} implementation.")
(replace (replace
'install 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let* ((out (assoc-ref outputs "out"))
(mkdir-p (string-append out "/lib")) (include (string-append out "/include"))
(mkdir (string-append out "/include")) (lib (string-append out "/lib")))
(copy-file "src/withershins.hpp" (mkdir-p include)
(string-append out "/include/withershins.hpp")) (install-file "src/withershins.hpp" include)
(copy-file "src/libwithershins.a" (mkdir-p lib)
(string-append out "/lib/libwithershins.a"))) (install-file "src/libwithershins.a" lib))
#t))))) #t)))))
(home-page "https://github.com/cameronwhite/withershins") (home-page "https://github.com/cameronwhite/withershins")
(inputs (inputs

View File

@ -64,7 +64,7 @@
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin"))) (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
(mkdir-p bin) (mkdir-p bin)
(copy-file "src/conky" (string-append bin "/conky")))) (install-file "src/conky" bin)))
%standard-phases)))) %standard-phases))))
(inputs (inputs
`(("freetype" ,freetype) `(("freetype" ,freetype)

View File

@ -68,10 +68,10 @@
(mkdir-p bin) (mkdir-p bin)
(mkdir-p doc) (mkdir-p doc)
(for-each (lambda (h) (for-each (lambda (h)
(copy-file h (string-append doc "/" (basename h)))) (install-file h doc))
`("License.txt" ,@(find-files "www" ".*\\.html"))) `("License.txt" ,@(find-files "www" ".*\\.html")))
(for-each (lambda (b) (for-each (lambda (b)
(copy-file b (string-append bin "/" b))) (install-file b bin))
`("delta" "multidelta" "topformflat"))))) `("delta" "multidelta" "topformflat")))))
(alist-delete 'configure %standard-phases)))) (alist-delete 'configure %standard-phases))))
(home-page "http://delta.tigris.org/") (home-page "http://delta.tigris.org/")
@ -212,13 +212,13 @@ tools that process C/C++ code.")
(system* "tar" "xf" (system* "tar" "xf"
(assoc-ref inputs "afl-src"))) (assoc-ref inputs "afl-src")))
(error "tar failed to unpack afl-src")) (error "tar failed to unpack afl-src"))
(copy-file (string-append patch-dir (install-file (string-append patch-dir
"/afl-qemu-cpu-inl.h") "/afl-qemu-cpu-inl.h")
"./afl-qemu-cpu-inl.h") ".")
(copy-file (string-append afl-dir "/config.h") (copy-file (string-append afl-dir "/config.h")
"./afl-config.h") "./afl-config.h")
(copy-file (string-append afl-dir "/types.h") (install-file (string-append afl-dir "/types.h")
"./types.h") ".")
(substitute* "afl-qemu-cpu-inl.h" (substitute* "afl-qemu-cpu-inl.h"
(("\\.\\./\\.\\./config.h") "afl-config.h")) (("\\.\\./\\.\\./config.h") "afl-config.h"))
(substitute* (string-append patch-dir (substitute* (string-append patch-dir

View File

@ -2101,7 +2101,7 @@ to a key in your preferred mode.")
;; keep only file of interest ;; keep only file of interest
'(begin '(begin
(for-each delete-file '("dot-emacs.el" "Makefile")) (for-each delete-file '("dot-emacs.el" "Makefile"))
(copy-file "6.945-config/mit-scheme-doc.el" "mit-scheme-doc.el") (install-file "6.945-config/mit-scheme-doc.el" ".")
(delete-file-recursively "6.945-config"))) (delete-file-recursively "6.945-config")))
(file-name (string-append name "-" version ".tar.bz2")) (file-name (string-append name "-" version ".tar.bz2"))
(method url-fetch) (method url-fetch)

View File

@ -96,13 +96,13 @@
(assoc-ref inputs "boost"))))) (assoc-ref inputs "boost")))))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let* ((out (assoc-ref outputs "out"))
(mkdir-p (string-append out "/bin")) (bin (string-append out "/bin"))
(mkdir-p (string-append out "/share/librecad")) (share (string-append out "/share/librecad")))
(copy-file "unix/librecad" (mkdir-p bin)
(string-append out "/bin/librecad")) (install-file "unix/librecad" bin)
(copy-recursively "unix/resources" (mkdir-p share)
(string-append out "/share/librecad")))))))) (copy-recursively "unix/resources" share)))))))
(inputs (inputs
`(("boost" ,boost) `(("boost" ,boost)
("muparser" ,muparser) ("muparser" ,muparser)