gnu: fonts: Use install-file where appropriate.

* gnu/packages/fonts.scm (font-wqy-microhei, font-google-roboto)[arguments]:
Substitute the simpler INSTALL-FILE for every COPY-FILE invoked with redundant
arguments.
This commit is contained in:
Tobias Geerinckx-Rice 2017-02-05 11:35:21 +01:00
parent 33a8687a2a
commit 4dcb3db0ee
No known key found for this signature in database
GPG Key ID: 91CCDB9B48541B99
1 changed files with 4 additions and 7 deletions

View File

@ -525,13 +525,11 @@ ko (Korean) locales for @code{fontconfig}.")
(let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:" (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
(assoc-ref %build-inputs "gzip") "/bin")) (assoc-ref %build-inputs "gzip") "/bin"))
(font-dir (string-append (assoc-ref %outputs "out") (font-dir (string-append (assoc-ref %outputs "out")
"/share/fonts/wenquanyi/"))) "/share/fonts/wenquanyi")))
(setenv "PATH" PATH)
(mkdir-p font-dir) (mkdir-p font-dir)
(setenv "PATH" PATH)
(system* "tar" "xvf" (assoc-ref %build-inputs "source")) (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
(chdir "wqy-microhei") (install-file "wqy-microhei/wqy-microhei.ttc" font-dir)))))
(copy-file "wqy-microhei.ttc"
(string-append font-dir "wqy-microhei.ttc"))))))
(native-inputs (native-inputs
`(("gzip" ,gzip) `(("gzip" ,gzip)
("tar" ,tar))) ("tar" ,tar)))
@ -760,8 +758,7 @@ display all Unicode symbols.")
(mkdir-p font-dir) (mkdir-p font-dir)
(chdir "roboto-hinted") (chdir "roboto-hinted")
(for-each (lambda (ttf) (for-each (lambda (ttf)
(copy-file ttf (install-file ttf font-dir))
(string-append font-dir "/" ttf)))
(find-files "." "\\.ttf$")))))) (find-files "." "\\.ttf$"))))))
(home-page "https://github.com/google/roboto") (home-page "https://github.com/google/roboto")
(synopsis "The Roboto family of fonts") (synopsis "The Roboto family of fonts")