gnu: font-hack: Use 'font-build-system'.

* gnu/packages/fonts.scm (font-hack): Switch to font-build-system.
[source]: Use url-fetch/zipbomb.
This commit is contained in:
Arun Isaac 2017-06-16 11:49:21 +05:30
parent 6084d9b420
commit 8069f889ee
No known key found for this signature in database
GPG key ID: 2E25EE8B61802BB3

View file

@ -794,7 +794,7 @@ (define-public font-hack
(name "font-hack")
(version "2.020")
(source (origin
(method url-fetch)
(method url-fetch/zipbomb)
(uri (string-append
"https://github.com/chrissimpkins/Hack/releases/download/v"
version "/Hack-v"
@ -803,28 +803,7 @@ (define-public font-hack
(sha256
(base32
"16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils)
(srfi srfi-26))
(let ((PATH (string-append (assoc-ref %build-inputs
"unzip")
"/bin"))
(font-dir (string-append %output
"/share/fonts/truetype")))
(setenv "PATH" PATH)
(system* "unzip" (assoc-ref %build-inputs "source"))
(mkdir-p font-dir)
(for-each (lambda (ttf)
(install-file ttf font-dir))
(find-files "." "\\.ttf$"))))))
(native-inputs
`(("source" ,source)
("unzip" ,unzip)))
(build-system font-build-system)
(home-page "https://sourcefoundry.org/hack/")
(synopsis "Typeface designed for source code")
(description