2020-02-17 01:07:00 +01:00
|
|
|
{ stdenv, fetchurl, mkfontscale
|
|
|
|
, libfaketime, fonttosfnt
|
|
|
|
}:
|
2010-07-28 17:35:01 +02:00
|
|
|
|
2015-01-11 15:07:51 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "unifont";
|
2020-03-29 19:04:55 +02:00
|
|
|
version = "13.0.01";
|
2010-07-28 17:35:01 +02:00
|
|
|
|
|
|
|
ttf = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://gnu/unifont/${pname}-${version}/${pname}-${version}.ttf";
|
2020-03-29 19:04:55 +02:00
|
|
|
sha256 = "0y5bd7i5hp9ks6d3qq0bshywba7g90i3074wckpn9m8shh98ngcg";
|
2008-03-02 19:39:33 +01:00
|
|
|
};
|
2010-07-28 17:35:01 +02:00
|
|
|
|
|
|
|
pcf = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://gnu/unifont/${pname}-${version}/${pname}-${version}.pcf.gz";
|
2020-03-29 19:04:55 +02:00
|
|
|
sha256 = "05zgz00n514cijqh9qcvr4iz0bla4hd028cvi1jlh0ic6fkafix8";
|
2008-03-02 19:39:33 +01:00
|
|
|
};
|
2010-07-28 17:35:01 +02:00
|
|
|
|
2020-02-17 01:07:00 +01:00
|
|
|
nativeBuildInputs = [ libfaketime fonttosfnt mkfontscale ];
|
2010-07-28 17:35:01 +02:00
|
|
|
|
2020-02-17 01:07:00 +01:00
|
|
|
phases = [ "buildPhase" "installPhase" ];
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
''
|
|
|
|
# convert pcf font to otb
|
|
|
|
faketime -f "1970-01-01 00:00:01" \
|
|
|
|
fonttosfnt -g 2 -m 2 -v -o "unifont.otb" "${pcf}"
|
|
|
|
'';
|
2010-07-28 17:35:01 +02:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
2020-02-17 01:07:00 +01:00
|
|
|
# install otb fonts
|
|
|
|
install -m 644 -D unifont.otb "$otb/share/fonts/unifont.otb"
|
|
|
|
mkfontdir "$otb/share/fonts"
|
|
|
|
|
|
|
|
# install pcf and ttf fonts
|
|
|
|
install -m 644 -D ${pcf} $out/share/fonts/unifont.pcf.gz
|
|
|
|
install -m 644 -D ${ttf} $out/share/fonts/truetype/unifont.ttf
|
|
|
|
cd "$out/share/fonts"
|
2015-01-11 15:07:51 +01:00
|
|
|
mkfontdir
|
2010-07-28 17:35:01 +02:00
|
|
|
mkfontscale
|
|
|
|
'';
|
2015-01-11 15:07:51 +01:00
|
|
|
|
2020-02-17 01:07:00 +01:00
|
|
|
outputs = [ "out" "otb" ];
|
2017-08-10 21:43:49 +02:00
|
|
|
|
2015-01-11 15:07:51 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Unicode font for Base Multilingual Plane";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://unifoundry.com/unifont.html";
|
2015-01-11 15:07:51 +01:00
|
|
|
|
|
|
|
# Basically GPL2+ with font exception.
|
2020-04-01 03:11:51 +02:00
|
|
|
license = "http://unifoundry.com/LICENSE.txt";
|
2016-07-04 19:32:08 +02:00
|
|
|
maintainers = [ maintainers.rycee maintainers.vrthra ];
|
2015-01-11 15:07:51 +01:00
|
|
|
platforms = platforms.all;
|
2008-03-02 19:39:33 +01:00
|
|
|
};
|
2010-07-28 17:35:01 +02:00
|
|
|
}
|