45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv, fetchurl, mkfontscale, mkfontdir }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "unifont-${version}";
|
|
version = "12.0.01";
|
|
|
|
ttf = fetchurl {
|
|
url = "mirror://gnu/unifont/${name}/${name}.ttf";
|
|
sha256 = "191vgddv5fksg7g01q692nfcb02ks2y28fi9fv8aghvs36q4iana";
|
|
};
|
|
|
|
pcf = fetchurl {
|
|
url = "mirror://gnu/unifont/${name}/${name}.pcf.gz";
|
|
sha256 = "14xbrsdrnllly8h2afan3b4v486vd4y8iff8zqmcfliw0cipm8v4";
|
|
};
|
|
|
|
nativeBuildInputs = [ 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
|
|
'';
|
|
|
|
outputHashAlgo = "sha256";
|
|
outputHashMode = "recursive";
|
|
outputHash = "1jccbz7wyyk7rpyapgsppcgakgpm1l9fqqxs7fg9naav7i0nzzpg";
|
|
|
|
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;
|
|
};
|
|
}
|