From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dvorsak Subject: [PATCH 1/2] gnu: Add font-ubuntu Date: Mon, 17 Aug 2015 01:04:26 +0200 Message-ID: <1439766267-15096-1-git-send-email-eric@dvorsak.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZR6zV-0008LG-4a for guix-devel@gnu.org; Sun, 16 Aug 2015 19:05:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZR6zR-0007TZ-Ec for guix-devel@gnu.org; Sun, 16 Aug 2015 19:05:25 -0400 Received: from 13.mo5.mail-out.ovh.net ([87.98.182.191]:38909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZR6zR-0007TJ-5z for guix-devel@gnu.org; Sun, 16 Aug 2015 19:05:21 -0400 Received: from mail624.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo5.mail-out.ovh.net (Postfix) with SMTP id EA28FFFA227 for ; Mon, 17 Aug 2015 01:05:18 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/fonts/scm (font-ubuntu): New variable. --- gnu/packages/fonts.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index f72c542..f26a599 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2014 Joshua Grant ;;; Copyright =C2=A9 2014 Alex Kost ;;; Copyright =C2=A9 2015 Sou Bunnbu +;;; Copyright =C2=A9 2015 Eric Dvorsak ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,10 +29,62 @@ #:use-module (guix build-system trivial) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages zip) #:use-module (gnu packages perl) #:use-module (gnu packages xorg) #:use-module (gnu packages pkg-config)) =20 +(define-public font-ubuntu + (package + (name "font-ubuntu") + (version "0.80") + (source (origin + (method url-fetch) + (uri (string-append "http://font.ubuntu.com/download/ubunt= u-font-family-" + version ".zip")) + (sha256 + (base32 + "0k4f548riq23gmw4zhn30qqkcpaj4g2ab5rbc3lflfxwkc4p0w8h"))= )) + (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-inpu= ts + "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) + (chdir (string-append "ubuntu-font-family-" ,versio= n)) + (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 "/" d= oc))) + (find-files "." "\\.txt$")))))) + (native-inputs `(("source" ,source) + ("unzip" ,unzip))) + (home-page "http://font.ubuntu.com/") + (synopsis "The Ubuntu Font Family") + (description "The Ubuntu Font Family is a unique, custom designed fo= nt +that has a very distinctive look and feel. This package provides the +TrueType (TTF) files.") + (license + (license:non-copyleft + "file://LICENCE.txt" + "See the LICENCE file in the distribution")))) + (define-public font-dejavu (package (name "font-dejavu") --=20 2.4.3