2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, fonttosfnt, mkfontscale, libfaketime }:
|
2010-07-29 19:55:16 +01:00
|
|
|
|
2020-02-09 17:21:26 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clearlyU";
|
|
|
|
version = "12-1.9";
|
2010-07-29 19:55:16 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-02-09 17:21:26 +00:00
|
|
|
url = "https://www.math.nmsu.edu/~mleisher/Software/cu/cu${version}.tgz";
|
2010-07-29 19:55:16 +01:00
|
|
|
sha256 = "1xn14jbv3m1khy7ydvad9ydkn7yygdbhjy9wm1v000jzjwr3lv21";
|
|
|
|
};
|
2019-05-13 02:55:32 +01:00
|
|
|
|
2020-02-09 17:21:26 +00:00
|
|
|
nativeBuildInputs = [ fonttosfnt mkfontscale libfaketime ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# convert bdf fonts to otb
|
|
|
|
for i in *.bdf; do
|
|
|
|
name=$(basename "$i" .bdf)
|
|
|
|
faketime -f "1970-01-01 00:00:01" fonttosfnt -g 2 -m 2 -v -o "$name.otb" "$i"
|
|
|
|
done
|
|
|
|
'';
|
2010-07-29 19:55:16 +01:00
|
|
|
|
2019-05-13 02:55:32 +01:00
|
|
|
installPhase = ''
|
2020-08-21 13:18:18 +01:00
|
|
|
# install otb and bdf fonts
|
2020-02-09 17:21:26 +00:00
|
|
|
fontDir="$out/share/fonts"
|
2020-08-21 13:18:18 +01:00
|
|
|
install -m 644 -D *.bdf *.otb -t "$fontDir"
|
2020-02-09 17:21:26 +00:00
|
|
|
mkfontdir "$fontDir"
|
2019-05-13 02:55:32 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2010-07-29 19:55:16 +01:00
|
|
|
description = "A Unicode font";
|
2020-02-09 17:21:26 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
2010-07-29 19:55:16 +01:00
|
|
|
};
|
2008-03-02 18:39:33 +00:00
|
|
|
}
|