From df0014488af9d0e6559143c2180fc20c6e865079 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Tue, 6 May 2014 03:48:04 -0400 Subject: [PATCH 1/2] First attempt at data/fonts/poly --- lib/maintainers.nix | 1 + pkgs/data/fonts/poly/default.nix | 47 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 pkgs/data/fonts/poly/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index cf0743fa403..2c7bfe549b1 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -67,6 +67,7 @@ qknight = "Joachim Schiele "; raskin = "Michael Raskin <7c6f434c@mail.ru>"; redbaron = "Maxim Ivanov "; + relrod = "Ricky Elrod "; rickynils = "Rickard Nilsson "; rob = "Rob Vermaas "; roconnor = "Russell O'Connor "; diff --git a/pkgs/data/fonts/poly/default.nix b/pkgs/data/fonts/poly/default.nix new file mode 100644 index 00000000000..fbb1db8a28e --- /dev/null +++ b/pkgs/data/fonts/poly/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, unzip }: + +stdenv.mkDerivation rec { + name = "poly"; + + regular = fetchurl { + # Finally a mirror that has a sha256 that doesn't change. + url = "https://googlefontdirectory.googlecode.com/hg-history/d7441308e589c9fa577f920fc4152fa32477a267/poly/src/Poly-Regular.otf"; + sha256 = "1mxp2lvki6b1h7r9xcj1ld0g4z5y3dmsal85xam4yr764zpjzaiw"; + }; + + italic = fetchurl { + # Finally a mirror that has a sha256 that doesn't change. + url = "https://googlefontdirectory.googlecode.com/hg-history/d7441308e589c9fa577f920fc4152fa32477a267/poly/src/Poly-Italic.otf"; + sha256 = "1chzcy3kyi7wpr4iq4aj1v24fq1wwph1v5z96dimlqcrnvm66h2l"; + }; + + buildInputs = [unzip]; + + sourceRoot = "."; + + unpackPhase = "true"; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + cp ${regular} $out/share/fonts/opentype/Poly-Regular.otf + cp ${italic} $out/share/fonts/opentype/Poly-Italic.otf + ''; + + meta = { + description = "Medium contrast serif font."; + longDescription = '' + With short ascenders and a very high x-height, Poly is efficient in small + sizes. Thanks to its careful balance between the x-height and glyph widths, + it allows more economy and legibility than standard web serifs, even in + small sizes. The aglutinative language for which it was designed contains + very long words. The goal was to develop a typeface that would tolerate + cramped tracking and that would increase the number of letters on a single + line. Poly is a Unicode typeface family that supports Open Type features + and languages that use the Latin script and its variants. + ''; + homepage = http://www.fontsquirrel.com/fonts/poly; + license = [ "OFL" ]; + maintainers = with stdenv.lib.maintainers; [ relrod ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f7841daa05..f2318a912e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7661,6 +7661,8 @@ let oldstandard = callPackage ../data/fonts/oldstandard { }; + poly = callPackage ../data/fonts/poly { }; + posix_man_pages = callPackage ../data/documentation/man-pages-posix { }; pthreadmanpages = callPackage ../data/documentation/pthread-man-pages { }; From 139c6fb180f4f95151003350e11ac9a3554541c9 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Tue, 6 May 2014 04:04:43 -0400 Subject: [PATCH 2/2] Add OFL as an actual license --- lib/licenses.nix | 6 ++++++ pkgs/data/fonts/poly/default.nix | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/licenses.nix b/lib/licenses.nix index 68f91f80685..e49528f2a2e 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -208,6 +208,12 @@ url = https://www.mozilla.org/MPL/2.0; }; + ofl = { + shortName = "OFL"; + fullName = "SIL Open Font License"; + url = "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web"; + }; + openssl = { shortName = "openssl"; fullName = "OpenSSL license"; diff --git a/pkgs/data/fonts/poly/default.nix b/pkgs/data/fonts/poly/default.nix index fbb1db8a28e..63006fdd4f8 100644 --- a/pkgs/data/fonts/poly/default.nix +++ b/pkgs/data/fonts/poly/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { and languages that use the Latin script and its variants. ''; homepage = http://www.fontsquirrel.com/fonts/poly; - license = [ "OFL" ]; + license = stdenv.lib.licenses.ofl; maintainers = with stdenv.lib.maintainers; [ relrod ]; platforms = with stdenv.lib.platforms; linux; };