Hi all,

Updated font patch conforming to all recommended guidelines.

Best,
Dylan
From e34aae393fda095251fff0fee261350bd5f19fa3 Mon Sep 17 00:00:00 2001
From: Dylan Jeffers <sapient...@openmailbox.org>
Date: Thu, 11 Aug 2016 13:59:55 -0700
Subject: [PATCH] gnu: Add font-adobe-source-code-pro.

* gnu/packages/fonts.scm (font-adobe-source-code-pro): New variable.
---
 gnu/packages/fonts.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 9b2281a..5b75f5a 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2016 Jookia <166...@gmail.com>
 ;;; Copyright © 2016 Eric Bavier <bav...@member.fsf.org>
 ;;; Copyright © 2016 Dmitry Nikolaev <camelthe...@gmail.com>
+;;; Copyright © 2016 Dylan Jeffers <sapient...@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -414,6 +415,53 @@ The Liberation Fonts are sponsored by Red Hat.")
 for long (8 and more hours per day) work with computers.")
     (license license:silofl1.1)))
 
+(define-public font-adobe-source-code-pro
+  (package
+    (name "font-adobe-source-code-pro")
+    (version "2.030")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/adobe-fonts/source-code-pro/archive/";
+                    version "R-ro/1.050R-it.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+         (begin
+           (use-modules (guix build utils))
+           (let ((tar  (string-append (assoc-ref %build-inputs
+                                                 "tar")
+                                      "/bin/tar"))
+                 (PATH (string-append (assoc-ref %build-inputs
+                                                 "gzip")
+                                      "/bin"))
+                 (font-dir (string-append
+                            %output "/share/fonts/truetype")))
+             (setenv "PATH" PATH)
+             (system* tar "xvf" (assoc-ref %build-inputs "source"))
+             (mkdir-p font-dir)
+             (chdir (string-append "source-code-pro-" ,version
+                                   "R-ro-1.050R-it/TTF/"))
+             (for-each (lambda (ttf)
+                         (copy-file ttf
+                                    (string-append font-dir "/"
+                                                   (basename ttf))))
+                       (find-files "." "\\.ttf$"))))))
+    (native-inputs
+     `(("gzip" ,gzip)
+       ("tar" ,tar)))
+    (home-page "https://adobe-fonts.github.io/source-code-pro/";)
+    (synopsis "Adobe's Source-Code-Pro TTF")
+    (description
+     "Source Code Pro is a set of OpenType fonts that have been designed
+to work well in user interface (UI) environments.")
+    (license license:silofl1.1)))
+
 (define-public font-adobe-source-han-sans
   (package
     (name "font-adobe-source-han-sans")
-- 
2.7.3

Reply via email to