mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
gnu: Use 'install-file' instead of 'mkdir-p' and 'copy-file' in obvious cases.
* gnu/packages/bioinformatics.scm (bedtools, bowtie, bwa, hisat, samtools, plink, star): Use 'install-file' instead of 'mkdir-p' + 'copy-file'. * gnu/packages/check.scm (catch-framework): Likewise. * gnu/packages/code.scm (global): Likewise. * gnu/packages/emacs.scm (magit-svn, haskell-mode, emacs-pdf-tools): Likewise. * gnu/packages/engineering.scm (fastcap, fasthenry): Likewise. * gnu/packages/gnuzilla.scm (nss): Likewise. * gnu/packages/guile.scm (guile-minikanren): Likewise. * gnu/packages/java.scm (swt): Likewise. * gnu/packages/make-bootstrap.scm (%static-binaries): Likewise. * gnu/packages/maths.scm (lpsolve): Likewise. * gnu/packages/mp3.scm (mpc123): Likewise. * gnu/packages/ninja.scm (ninja): Likewise. * gnu/packages/python.scm (python-numpy, python-pyparsing): Likewise. * gnu/packages/screen.scm (dtach): Likewise. * gnu/packages/synergy.scm (synergy): Likewise. * gnu/packages/textutils.scm (utf8proc): Likewise. * gnu/packages/version-control.scm (git-test-sequence): Likewise. * gnu/packages/wicd.scm (wicd): Likewise.
This commit is contained in:
parent
4cc2ed98cf
commit
96c4621056
18 changed files with 68 additions and 114 deletions
|
@ -228,9 +228,8 @@ (define-public bedtools
|
|||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
|
||||
(mkdir-p bin)
|
||||
(for-each (lambda (file)
|
||||
(copy-file file (string-append bin (basename file))))
|
||||
(install-file file bin))
|
||||
(find-files "bin" ".*"))))
|
||||
%standard-phases)))))
|
||||
(home-page "https://github.com/arq5x/bedtools2")
|
||||
|
@ -554,9 +553,8 @@ (define-public bowtie
|
|||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
|
||||
(mkdir-p bin)
|
||||
(for-each (lambda (file)
|
||||
(copy-file file (string-append bin file)))
|
||||
(install-file file bin))
|
||||
(find-files "." "bowtie2.*"))))
|
||||
(alist-replace
|
||||
'check
|
||||
|
@ -606,9 +604,9 @@ (define-public bwa
|
|||
(mkdir-p bin)
|
||||
(mkdir-p doc)
|
||||
(mkdir-p man)
|
||||
(copy-file "bwa" (string-append bin "/bwa"))
|
||||
(copy-file "README.md" (string-append doc "/README.md"))
|
||||
(copy-file "bwa.1" (string-append man "/bwa.1"))))
|
||||
(install-file "bwa" bin)
|
||||
(install-file "README.md" doc)
|
||||
(install-file "bwa.1" man)))
|
||||
;; no "configure" script
|
||||
(alist-delete 'configure %standard-phases))))
|
||||
(inputs `(("zlib" ,zlib)))
|
||||
|
@ -1264,14 +1262,12 @@ (define-public hisat
|
|||
(alist-replace
|
||||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
|
||||
(mkdir-p bin)
|
||||
(for-each
|
||||
(lambda (file)
|
||||
(copy-file file (string-append bin file)))
|
||||
(find-files
|
||||
"."
|
||||
"hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$"))))
|
||||
(let ((bin (string-append (assoc-ref outputs "out") "/bi/")))
|
||||
(for-each (lambda (file)
|
||||
(install-file file bin))
|
||||
(find-files
|
||||
"."
|
||||
"hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$"))))
|
||||
(alist-delete 'configure %standard-phases)))))
|
||||
(native-inputs
|
||||
`(("unzip" ,unzip)))
|
||||
|
@ -1989,17 +1985,14 @@ (define-public samtools
|
|||
'install 'install-library
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((lib (string-append (assoc-ref outputs "out") "/lib")))
|
||||
(mkdir-p lib)
|
||||
(copy-file "libbam.a" (string-append lib "/libbam.a"))))
|
||||
(install-file "libbam.a" lib)))
|
||||
(alist-cons-after
|
||||
'install 'install-headers
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((include (string-append (assoc-ref outputs "out")
|
||||
"/include/samtools/")))
|
||||
(mkdir-p include)
|
||||
(for-each (lambda (file)
|
||||
(copy-file file (string-append include
|
||||
(basename file))))
|
||||
(install-file file include))
|
||||
(scandir "." (lambda (name) (string-match "\\.h$" name))))
|
||||
#t))
|
||||
(alist-delete 'configure %standard-phases))))))
|
||||
|
@ -2254,8 +2247,7 @@ (define-public plink
|
|||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out")
|
||||
"/bin/")))
|
||||
(mkdir-p bin)
|
||||
(copy-file "plink" (string-append bin "plink"))
|
||||
(install-file "plink" bin)
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("zlib" ,zlib)
|
||||
|
@ -2477,8 +2469,7 @@ (define-public star
|
|||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
|
||||
(mkdir-p bin)
|
||||
(copy-file "STAR" (string-append bin "STAR"))))
|
||||
(install-file "STAR" bin)))
|
||||
(alist-delete
|
||||
'configure %standard-phases)))))
|
||||
(native-inputs
|
||||
|
|
|
@ -136,10 +136,9 @@ (define-public catch-framework
|
|||
,version)))
|
||||
(begin
|
||||
(for-each mkdir-p (list incdir docdir))
|
||||
(copy-file (string-append source
|
||||
(install-file (string-append source
|
||||
"/single_include/catch.hpp")
|
||||
(string-append incdir
|
||||
"/catch.hpp"))
|
||||
incdir)
|
||||
(copy-recursively (string-append source "/docs")
|
||||
docdir))))))
|
||||
(home-page "http://catch-lib.net/")
|
||||
|
|
|
@ -117,9 +117,8 @@ (define-public global ; a global variable
|
|||
(let* ((out (assoc-ref outputs "out"))
|
||||
(data (string-append out "/share/gtags"))
|
||||
(lisp (string-append out "/share/emacs/site-lisp")))
|
||||
(mkdir-p lisp)
|
||||
(copy-file (string-append data "/gtags.el")
|
||||
(string-append lisp "/gtags.el"))
|
||||
(install-file (string-append data "/gtags.el")
|
||||
lisp)
|
||||
(delete-file (string-append data "/gtags.el"))
|
||||
#t))
|
||||
%standard-phases)))
|
||||
|
|
|
@ -406,9 +406,9 @@ (define-public magit-svn
|
|||
(lisp-dir (string-append %output "/share/emacs/site-lisp")))
|
||||
(setenv "PATH" PATH)
|
||||
(system* tar "xvf" source)
|
||||
(mkdir-p lisp-dir)
|
||||
(copy-file (string-append ,name "-" ,version "/magit-svn.el")
|
||||
(string-append lisp-dir "/magit-svn.el"))
|
||||
|
||||
(install-file (string-append ,name "-" ,version "/magit-svn.el")
|
||||
lisp-dir)
|
||||
|
||||
(with-directory-excursion lisp-dir
|
||||
(parameterize ((%emacs emacs))
|
||||
|
@ -462,18 +462,14 @@ (define-public haskell-mode
|
|||
out "/share/doc/haskell-mode-" ,version))
|
||||
(info (string-append out "/share/info")))
|
||||
(define (copy-to-dir dir files)
|
||||
(mkdir-p dir)
|
||||
(for-each
|
||||
(lambda (f)
|
||||
(copy-file f (string-append dir "/" (basename f))))
|
||||
files))
|
||||
(for-each (lambda (f)
|
||||
(install-file f dir))
|
||||
files))
|
||||
|
||||
(with-directory-excursion "doc"
|
||||
(unless (zero? (system* "makeinfo" "haskell-mode.texi"))
|
||||
(error "makeinfo failed"))
|
||||
(mkdir-p info)
|
||||
(copy-file "haskell-mode.info"
|
||||
(string-append info "/haskell-mode.info")))
|
||||
(install-file "haskell-mode.info" info))
|
||||
(copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
|
||||
(copy-to-dir el-dir (find-files "." "\\.elc?"))
|
||||
;; these are now distributed with emacs
|
||||
|
@ -876,11 +872,9 @@ (define-public emacs-pdf-tools
|
|||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((target (string-append (assoc-ref outputs "out")
|
||||
"/share/emacs/site-lisp/")))
|
||||
(mkdir-p target)
|
||||
(for-each
|
||||
(lambda (file)
|
||||
(copy-file file (string-append target (basename file))))
|
||||
(find-files "../lisp" "^(pdf|tab).*\\.elc?"))
|
||||
(for-each (lambda (file)
|
||||
(install-file file target))
|
||||
(find-files "../lisp" "^(pdf|tab).*\\.elc?"))
|
||||
(emacs-byte-compile-directory target)
|
||||
(emacs-generate-autoloads "pdf-tools" target)))))))
|
||||
(native-inputs `(("autoconf" ,autoconf)
|
||||
|
|
|
@ -300,11 +300,9 @@ (define-public fastcap
|
|||
(doc (string-append data "/doc/" ,name "-" ,version))
|
||||
(examples (string-append doc "/examples")))
|
||||
(with-directory-excursion "bin"
|
||||
(mkdir-p bin)
|
||||
(for-each
|
||||
(lambda (f)
|
||||
(copy-file f (string-append bin "/" (basename f))))
|
||||
(find-files "." ".*")))
|
||||
(for-each (lambda (f)
|
||||
(install-file f bin))
|
||||
(find-files "." ".*")))
|
||||
(copy-recursively "doc" doc)
|
||||
(copy-recursively "examples" examples)
|
||||
#t))))))
|
||||
|
@ -350,11 +348,9 @@ (define-public fasthenry
|
|||
(doc (string-append data "/doc/" ,name "-" ,version))
|
||||
(examples (string-append doc "/examples")))
|
||||
(with-directory-excursion "bin"
|
||||
(mkdir-p bin)
|
||||
(for-each
|
||||
(lambda (f)
|
||||
(copy-file f (string-append bin "/" (basename f))))
|
||||
(find-files "." ".*")))
|
||||
(for-each (lambda (f)
|
||||
(install-file f bin))
|
||||
(find-files "." ".*")))
|
||||
(copy-recursively "doc" doc)
|
||||
(copy-recursively "examples" examples)
|
||||
#t))))))
|
||||
|
|
|
@ -190,14 +190,12 @@ (define-public nss
|
|||
(obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
|
||||
((obj) (string-append "dist/" obj)))))
|
||||
;; Install nss-config to $out/bin.
|
||||
(mkdir-p (string-append out "/bin"))
|
||||
(copy-file (string-append obj "/bin/nss-config")
|
||||
(string-append out "/bin/nss-config"))
|
||||
(install-file (string-append obj "/bin/nss-config")
|
||||
(string-append out "/bin"))
|
||||
(delete-file (string-append obj "/bin/nss-config"))
|
||||
;; Install nss.pc to $out/lib/pkgconfig.
|
||||
(mkdir-p (string-append out "/lib/pkgconfig"))
|
||||
(copy-file (string-append obj "/lib/pkgconfig/nss.pc")
|
||||
(string-append out "/lib/pkgconfig/nss.pc"))
|
||||
(install-file (string-append obj "/lib/pkgconfig/nss.pc")
|
||||
(string-append out "/lib/pkgconfig"))
|
||||
(delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
|
||||
(rmdir (string-append obj "/lib/pkgconfig"))
|
||||
;; Install other files.
|
||||
|
|
|
@ -452,7 +452,7 @@ (define-public guile-minikanren
|
|||
scm-files)
|
||||
|
||||
;; Also copy over the README.
|
||||
(copy-file "README.org" (string-append doc "/README.org"))
|
||||
(install-file "README.org" doc)
|
||||
#t))))
|
||||
(inputs
|
||||
`(("guile" ,guile-2.0)))
|
||||
|
|
|
@ -102,8 +102,8 @@ (define-public swt
|
|||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((java (string-append (assoc-ref outputs "out")
|
||||
"/share/java")))
|
||||
(mkdir-p java)
|
||||
(copy-file "swt.jar" (string-append java "/swt.jar"))) #t)
|
||||
(install-file "swt.jar" java)
|
||||
#t))
|
||||
(alist-delete 'configure %standard-phases))))))
|
||||
(inputs
|
||||
`(("xulrunner" ,icecat)
|
||||
|
|
|
@ -253,10 +253,8 @@ (define (copy-directory source destination)
|
|||
|
||||
;; But of course, there are exceptions to this rule.
|
||||
(let ((grep (assoc-ref %build-inputs "grep")))
|
||||
(copy-file (string-append grep "/bin/fgrep")
|
||||
(string-append bin "/fgrep"))
|
||||
(copy-file (string-append grep "/bin/egrep")
|
||||
(string-append bin "/egrep")))
|
||||
(install-file (string-append grep "/bin/fgrep") bin)
|
||||
(install-file (string-append grep "/bin/egrep") bin))
|
||||
|
||||
;; Clear references to the store path.
|
||||
(for-each remove-store-references
|
||||
|
|
|
@ -1828,21 +1828,17 @@ (define-public lpsolve
|
|||
(string-append lib "/liblpsolve55.a"))
|
||||
(copy-file "lpsolve55/bin/ux64/liblpsolve55.so"
|
||||
(string-append lib "/liblpsolve55.so"))
|
||||
(mkdir-p bin)
|
||||
(copy-file "lp_solve/bin/ux64/lp_solve"
|
||||
(string-append bin "/lp_solve"))
|
||||
(mkdir-p include)
|
||||
(install-file "lp_solve/bin/ux64/lp_solve" bin)
|
||||
|
||||
;; Install a subset of the header files as on Debian
|
||||
;; (plus lp_bit.h, which matches the regular expression).
|
||||
(for-each
|
||||
(lambda (name)
|
||||
(copy-file name (string-append include "/" name)))
|
||||
(find-files "." "lp_[HMSa-z].*\\.h$"))
|
||||
(for-each (lambda (name)
|
||||
(install-file name include))
|
||||
(find-files "." "lp_[HMSa-z].*\\.h$"))
|
||||
(with-directory-excursion "shared"
|
||||
(for-each
|
||||
(lambda (name)
|
||||
(copy-file name (string-append include "/" name)))
|
||||
(find-files "." "\\.h$")))
|
||||
(for-each (lambda (name)
|
||||
(install-file name include))
|
||||
(find-files "." "\\.h$")))
|
||||
#t))))))
|
||||
(home-page "http://lpsolve.sourceforge.net/")
|
||||
(synopsis "Mixed integer linear programming (MILP) solver")
|
||||
|
|
|
@ -435,7 +435,7 @@ (define-public mpc123
|
|||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(mkdir-p bin)
|
||||
(copy-file "mpc123" (string-append bin "/mpc123"))))
|
||||
(install-file "mpc123" bin)))
|
||||
%standard-phases))
|
||||
#:tests? #f))
|
||||
|
||||
|
|
|
@ -66,11 +66,8 @@ (define-public ninja
|
|||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin"))
|
||||
(doc (string-append out "/share/doc/ninja")))
|
||||
(mkdir-p bin)
|
||||
(copy-file "ninja" (string-append bin "/ninja"))
|
||||
(mkdir-p doc)
|
||||
(copy-file "doc/manual.asciidoc"
|
||||
(string-append doc "/manual.asciidoc"))
|
||||
(install-file "ninja" bin)
|
||||
(install-file "doc/manual.asciidoc" doc)
|
||||
#t))))))
|
||||
(home-page "http://martine.github.io/ninja/")
|
||||
(synopsis "Small build system")
|
||||
|
|
|
@ -2784,7 +2784,7 @@ (define-public python-numpy
|
|||
(tgt-dir (string-append html "/" dir)))
|
||||
(unless (equal? "." dir)
|
||||
(mkdir-p tgt-dir))
|
||||
(copy-file file (string-append html "/" file))))
|
||||
(install-file file html)))
|
||||
(find-files "." ".*"))))))
|
||||
,phases)))))))
|
||||
|
||||
|
@ -2828,7 +2828,7 @@ (define-public python-pyparsing
|
|||
(for-each
|
||||
(lambda (dir tgt)
|
||||
(map (lambda (file)
|
||||
(copy-file file (string-append tgt "/" (basename file))))
|
||||
(install-file file tgt))
|
||||
(find-files dir ".*")))
|
||||
(list "docs" "htmldoc" "examples")
|
||||
(list doc html-doc examples))))
|
||||
|
@ -3140,9 +3140,7 @@ (define-public python-scipy
|
|||
(for-each (lambda (file)
|
||||
(let* ((dir (dirname file))
|
||||
(tgt-dir (string-append html "/" dir)))
|
||||
(unless (equal? "." dir)
|
||||
(mkdir-p tgt-dir))
|
||||
(copy-file file (string-append html "/" file))))
|
||||
(install-file file html)))
|
||||
(find-files "." ".*"))))))
|
||||
;; Tests can only be run after the library has been installed and not
|
||||
;; within the source directory.
|
||||
|
|
|
@ -79,8 +79,7 @@ (define-public dtach
|
|||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(mkdir-p (string-append out "/bin"))
|
||||
(copy-file "dtach" (string-append out "/bin/dtach"))))
|
||||
(install-file "dtach" (string-append out "/bin"))))
|
||||
%standard-phases)
|
||||
;; No check target.
|
||||
#:tests? #f))
|
||||
|
|
|
@ -92,19 +92,15 @@ (define-public synergy
|
|||
(ex (string-append out "/share/doc/synergy-"
|
||||
,version "/examples")))
|
||||
(begin
|
||||
(mkdir-p bin)
|
||||
(for-each
|
||||
(lambda (f)
|
||||
(copy-file (string-append srcdir "/bin/" f)
|
||||
(string-append bin "/" f)))
|
||||
(install-file (string-append srcdir "/bin/" f) bin))
|
||||
'("synergyc" "synergys" "synergyd"
|
||||
"usynergy" "syntool"))
|
||||
;; Install example configuration files
|
||||
(mkdir-p ex)
|
||||
(for-each
|
||||
(lambda (e)
|
||||
(copy-file (string-append srcdir "/doc/" e)
|
||||
(string-append ex "/" e)))
|
||||
(install-file (string-append srcdir "/doc/" e) ex))
|
||||
'("synergy.conf.example"
|
||||
"synergy.conf.example-advanced"
|
||||
"synergy.conf.example-basic")))))
|
||||
|
|
|
@ -111,11 +111,9 @@ (define-public utf8proc
|
|||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((lib (string-append (assoc-ref outputs "out") "/lib/"))
|
||||
(include (string-append (assoc-ref outputs "out") "/include/")))
|
||||
(mkdir-p lib)
|
||||
(mkdir-p include)
|
||||
(copy-file "utf8proc.h" (string-append include "utf8proc.h"))
|
||||
(install-file "utf8proc.h" include)
|
||||
(for-each (lambda (file)
|
||||
(copy-file file (string-append lib (basename file))))
|
||||
(install-file file lib))
|
||||
'("libutf8proc.a" "libutf8proc.so"))))
|
||||
;; no configure script
|
||||
(alist-delete 'configure %standard-phases))))
|
||||
|
|
|
@ -432,11 +432,9 @@ (define-public git-test-sequence
|
|||
(output (assoc-ref %outputs "out"))
|
||||
(bindir (string-append output "/bin"))
|
||||
(script "git-test-sequence"))
|
||||
(begin
|
||||
(mkdir-p bindir)
|
||||
(copy-file (string-append source "/" script)
|
||||
(string-append bindir "/" script))
|
||||
#t)))))
|
||||
(install-file (string-append source "/" script)
|
||||
bindir)
|
||||
#t))))
|
||||
(home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html")
|
||||
(synopsis "Run a command over a sequence of commits")
|
||||
(description
|
||||
|
|
|
@ -174,16 +174,13 @@ (define (which* cmd)
|
|||
;; directory.
|
||||
(let ((dest-dir (string-append out "/etc/wicd"))
|
||||
(name "dhclient.conf.template.default"))
|
||||
(mkdir-p dest-dir)
|
||||
(copy-file (string-append "other/" name)
|
||||
(string-append dest-dir "/" name)))
|
||||
(install-file (string-append "other/" name) dest-dir))
|
||||
|
||||
;; Copy index.theme from hicolor-icon-theme. This is needed to
|
||||
;; allow wicd-gtk to find its icons.
|
||||
(let ((hicolor (assoc-ref inputs "hicolor-icon-theme"))
|
||||
(name "/share/icons/hicolor/index.theme"))
|
||||
(copy-file (string-append hicolor name)
|
||||
(string-append out name)))
|
||||
(install-file (string-append hicolor name) out))
|
||||
#t))
|
||||
%standard-phases))))
|
||||
(synopsis "Network connection manager")
|
||||
|
|
Loading…
Reference in a new issue