nixpkgs/pkgs/data/fonts/unifont/default.nix
Robert Helgesson 321e2a9153
unifont: 9.0.03 -> 9.0.04
Also change download URL to use GNU mirrors.
2016-11-05 07:56:16 +01:00

41 lines
1.1 KiB
Nix

{ stdenv, fetchurl, mkfontscale, mkfontdir }:
stdenv.mkDerivation rec {
name = "unifont-${version}";
version = "9.0.04";
ttf = fetchurl {
url = "mirror://gnu/unifont/${name}/${name}.ttf";
sha256 = "052waajjdry67jjl7vy984padyzdrkhf5gylgbnvj90q6d52j02z";
};
pcf = fetchurl {
url = "mirror://gnu/unifont/${name}/${name}.pcf.gz";
sha256 = "0736qmlzsf4xlipj4vzihafkigc3xjisxnwcqhl9dzkhxfjq9612";
};
buildInputs = [ mkfontscale mkfontdir ];
phases = "installPhase";
installPhase =
''
mkdir -p $out/share/fonts $out/share/fonts/truetype
cp -v ${pcf} $out/share/fonts/unifont.pcf.gz
cp -v ${ttf} $out/share/fonts/truetype/unifont.ttf
cd $out/share/fonts
mkfontdir
mkfontscale
'';
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 maintainers.vrthra ];
platforms = platforms.all;
};
}