From a9b2e757e2d2ac3922d0188231e3f893b46ecc48 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 11 Jan 2015 15:07:51 +0100 Subject: [PATCH] unifont: update from 5.1-20080907 to 7.0.06 (close #5748) Also expand meta set and add myself as maintainer. --- pkgs/data/fonts/unifont/default.nix | 39 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/pkgs/data/fonts/unifont/default.nix b/pkgs/data/fonts/unifont/default.nix index 893659bc763e..6b2a4ffe9608 100644 --- a/pkgs/data/fonts/unifont/default.nix +++ b/pkgs/data/fonts/unifont/default.nix @@ -1,37 +1,40 @@ -{ stdenv, fetchurl, mkfontscale, mkfontdir, bdftopcf, fontutil }: +{ stdenv, fetchurl, mkfontscale, mkfontdir }: -let +stdenv.mkDerivation rec { + name = "unifont-${version}"; + version = "7.0.06"; ttf = fetchurl { - url = http://unifoundry.com/unifont-5.1.20080907.ttf.gz; - sha256 = "03ssxsfhnayarzx15mn6khry2kgdxhkkc1bqzgr0c85ab5xm9jxw"; + url = "http://unifoundry.com/pub/${name}/font-builds/${name}.ttf"; + sha256 = "0qmk06rwhxs43n1xbwj14fanbih60zqli002qhy0609da24r3957"; }; pcf = fetchurl { - url = http://unifoundry.com/unifont-5.1.20080820.pcf.gz; - sha256 = "0qwsgaplb2a79w14rrvazby3kwx7vyk08x70n0ih5dr91x3rqaqj"; + url = "http://unifoundry.com/pub/${name}/font-builds/${name}.pcf.gz"; + sha256 = "1wplig57wpc79mlqamhknn39cibg5z8dvbyibp1490ljcjs1dxdc"; }; -in + buildInputs = [ mkfontscale mkfontdir ]; -stdenv.mkDerivation { - name = "unifont-5.1-20080907"; + phases = "installPhase"; - buildInputs = [ mkfontscale mkfontdir bdftopcf fontutil ]; - - unpackPhase = "true"; - installPhase = '' mkdir -p $out/share/fonts $out/share/fonts/truetype - cp ${pcf} $out/share/fonts/unifont.pcf.gz - gunzip < ${ttf} > $out/share/fonts/truetype/unifont.ttf + cp -v ${pcf} $out/share/fonts/unifont.pcf.gz + cp -v ${ttf} $out/share/fonts/truetype/unifont.ttf cd $out/share/fonts - mkfontdir + mkfontdir mkfontscale ''; - - meta = { + + meta = with stdenv.lib; { description = "Unicode font for Base Multilingual Plane"; + homepage = http://unifoundry.com/unifont.html; + + # Basically GPL2+ with font exception. + license = http://unifoundry.com/LICENSE.txt; + maintainers = [ maintainers.rycee ]; + platforms = platforms.all; }; }