Browse Source

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.
wip-container
Ludovic Courtès 7 years ago
parent
commit
96c4621056
  1. 39
      gnu/packages/bioinformatics.scm
  2. 5
      gnu/packages/check.scm
  3. 5
      gnu/packages/code.scm
  4. 26
      gnu/packages/emacs.scm
  5. 16
      gnu/packages/engineering.scm
  6. 10
      gnu/packages/gnuzilla.scm
  7. 2
      gnu/packages/guile.scm
  8. 4
      gnu/packages/java.scm
  9. 6
      gnu/packages/make-bootstrap.scm
  10. 20
      gnu/packages/maths.scm
  11. 2
      gnu/packages/mp3.scm
  12. 7
      gnu/packages/ninja.scm
  13. 8
      gnu/packages/python.scm
  14. 3
      gnu/packages/screen.scm
  15. 8
      gnu/packages/synergy.scm
  16. 6
      gnu/packages/textutils.scm
  17. 8
      gnu/packages/version-control.scm
  18. 7
      gnu/packages/wicd.scm

39
gnu/packages/bioinformatics.scm

@ -228,9 +228,8 @@ computational cluster.")
'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 @@ confidence to have in an alignment.")
'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 @@ gapped, local, and paired-end alignment modes.")
(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 @@ estimates transcript expression.")
(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 @@ distribution, coverage uniformity, strand specificity, etc.")
'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 @@ accessed/downloaded on demand across HTTP.")
(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 @@ bioinformatics file formats, sequence alignment, and more.")
'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

5
gnu/packages/check.scm

@ -136,10 +136,9 @@ supervised tests.")
,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/")

5
gnu/packages/code.scm

@ -117,9 +117,8 @@ highlighting your own code that seemed comprehensible when you wrote it.")
(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)))

26
gnu/packages/emacs.scm

@ -406,9 +406,9 @@ operations.")
(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 @@ support for Git-SVN.")
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 @@ single buffer.")
(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)

16
gnu/packages/engineering.scm

@ -300,11 +300,9 @@ optimizer; and it can produce photorealistic and design review images.")
(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 @@ multipole-accelerated algorithm.")
(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))))))

10
gnu/packages/gnuzilla.scm

@ -190,14 +190,12 @@ in the Mozilla clients.")
(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.

2
gnu/packages/guile.scm

@ -452,7 +452,7 @@ http:://json.org specification. These are the main features:
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)))

4
gnu/packages/java.scm

@ -102,8 +102,8 @@
(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)

6
gnu/packages/make-bootstrap.scm

@ -253,10 +253,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
;; 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

20
gnu/packages/maths.scm

@ -1828,21 +1828,17 @@ specifications.")
(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")

2
gnu/packages/mp3.scm

@ -435,7 +435,7 @@ format.")
(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))

7
gnu/packages/ninja.scm

@ -66,11 +66,8 @@
(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")

8
gnu/packages/python.scm

@ -2784,7 +2784,7 @@ association studies (GWAS) on extremely large data sets.")
(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 @@ association studies (GWAS) on extremely large data sets.")
(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 @@ atlas_libs = openblas
(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.

3
gnu/packages/screen.scm

@ -79,8 +79,7 @@ view to show two terminals at once.")
'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))

8
gnu/packages/synergy.scm

@ -92,19 +92,15 @@
(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")))))

6
gnu/packages/textutils.scm

@ -111,11 +111,9 @@ libenca and several charset conversion libraries and tools.")
(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))))

8
gnu/packages/version-control.scm

@ -432,11 +432,9 @@ lot easier.")
(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

7
gnu/packages/wicd.scm

@ -174,16 +174,13 @@
;; 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…
Cancel
Save