summary refs log tree commit diff
path: root/gnu/packages/fonts.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-06-12 22:02:04 -0400
committerLeo Famulari <leo@famulari.name>2016-06-12 22:09:26 -0400
commitee86e7e14859533045e1f7727ae731ba6ba72daf (patch)
treea5f51a9c4859a3242b46876797b98e77a5a7506e /gnu/packages/fonts.scm
parent8af5cac527eee03005f3809578a0d8258a878f95 (diff)
parentfe585be9aa8f5158a7dfb6477d19ece3d643dec3 (diff)
downloadguix-ee86e7e14859533045e1f7727ae731ba6ba72daf.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/fonts.scm')
-rw-r--r--gnu/packages/fonts.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index deb11841da..4b8a278610 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
 ;;; Copyright © 2016 Jookia <166291@gmail.com>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -808,3 +809,57 @@ mind.  The font includes a bold version and a good italic version with new
 glyph designs, not just an added slant.")
     (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
     (license license:silofl1.1)))
+
+(define-public font-hack
+  (package
+    (name "font-hack")
+    (version "2.020")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/chrissimpkins/Hack/releases/download/v"
+                    version "/Hack-v"
+                    (string-replace-substring version "." "_")
+                    "-ttf.zip"))
+              (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"))
+                         (doc-dir  (string-append %output "/share/doc/"
+                                                  ,name "-" ,version)))
+                     (setenv "PATH" PATH)
+                     (system* "unzip" (assoc-ref %build-inputs "source"))
+
+                     (mkdir-p font-dir)
+                     (mkdir-p doc-dir)
+                     (for-each (lambda (ttf)
+                                 (copy-file ttf
+                                            (string-append font-dir "/" ttf)))
+                               (find-files "." "\\.ttf$"))
+                     (for-each (lambda (doc)
+                                 (copy-file doc
+                                            (string-append doc-dir "/" doc)))
+                               (find-files "." "\\.txt$"))))))
+    (native-inputs
+     `(("source" ,source)
+       ("unzip" ,unzip)))
+    (home-page "https://sourcefoundry.org/hack/")
+    (synopsis "Typeface designed for sourcecode")
+    (description
+     "Hack is designed to be a workhorse typeface for code, it expands upon
+the Bitstream Vera & DejaVu projects, provides 1561 glyphs including
+powerline support.")
+    (license (license:x11-style
+              "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
+              "Hack Open Font License v2.0"))))