2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, bdftopcf
|
2020-02-17 16:06:23 +00:00
|
|
|
, libfaketime, fonttosfnt, mkfontscale
|
|
|
|
}:
|
2010-07-28 12:55:54 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ucs-fonts";
|
2016-07-23 01:07:44 +01:00
|
|
|
version = "20090406";
|
2008-03-02 19:19:34 +00:00
|
|
|
|
2016-07-23 01:07:44 +01:00
|
|
|
srcs = [
|
|
|
|
(fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz";
|
2016-07-23 01:07:44 +01:00
|
|
|
sha256 = "12hgizg25fzmk10wjl0c88x97h3pg5r9ga122s3y28wixz6x2bvh";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts-asian.tar.gz";
|
2016-07-23 01:07:44 +01:00
|
|
|
sha256 = "0ibjy4xpz5j373hsdr8bx99czfpclqmviwwv768j8n7z12z3wa51";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts-75dpi100dpi.tar.gz";
|
2016-07-23 01:07:44 +01:00
|
|
|
sha256 = "08vqr8yb636xa1s28vf3pm22dzkia0gisvsi2svqjqh4kk290pzh";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2020-02-17 16:06:23 +00:00
|
|
|
nativeBuildInputs =
|
|
|
|
[ bdftopcf libfaketime fonttosfnt
|
|
|
|
mkfontscale
|
|
|
|
];
|
2008-03-02 19:19:34 +00:00
|
|
|
|
2020-02-17 16:06:23 +00:00
|
|
|
buildPhase = ''
|
|
|
|
for i in *.bdf; do
|
|
|
|
name=$(basename "$i" .bdf)
|
|
|
|
|
|
|
|
# generate pcf fonts (for X11 applications)
|
|
|
|
bdftopcf -t "$i" | gzip -n -9 -c > "$name.pcf.gz"
|
|
|
|
|
|
|
|
# generate otb fonts (for GTK applications)
|
|
|
|
faketime -f "1970-01-01 00:00:01" \
|
|
|
|
fonttosfnt -v -o "$name.otb" "$i"
|
|
|
|
done
|
|
|
|
'';
|
2008-03-02 19:19:34 +00:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
installPhase = ''
|
2020-08-21 13:18:18 +01:00
|
|
|
install -m 644 -D *.otb *.pcf.gz -t "$out/share/fonts/misc"
|
|
|
|
install -m 644 -D *.bdf -t "$bdf/share/fonts/misc"
|
2020-02-17 16:06:23 +00:00
|
|
|
|
|
|
|
mkfontdir "$out/share/fonts/misc"
|
|
|
|
mkfontdir "$bdf/share/fonts/misc"
|
2010-07-28 12:55:54 +01:00
|
|
|
'';
|
2008-03-02 19:19:34 +00:00
|
|
|
|
2020-08-21 13:18:18 +01:00
|
|
|
outputs = [ "out" "bdf" ];
|
2017-08-10 20:43:49 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-02-17 16:06:23 +00:00
|
|
|
homepage = "https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html";
|
2010-07-28 12:55:54 +01:00
|
|
|
description = "Unicode bitmap fonts";
|
2020-02-17 16:06:23 +00:00
|
|
|
license = licenses.publicDomain;
|
2016-07-23 01:07:44 +01:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.all;
|
2010-07-28 12:55:54 +01:00
|
|
|
};
|
2016-07-23 01:07:44 +01:00
|
|
|
}
|