2020-02-16 00:50:14 +00:00
|
|
|
{ stdenv, fetchurl, fontforge, mkfontscale }:
|
2019-03-13 03:45:19 +00:00
|
|
|
|
|
|
|
let
|
2019-05-13 02:55:32 +01:00
|
|
|
version = "1.11";
|
2019-03-13 03:45:19 +00:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "tamsyn-font";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.fial.com/~scott/tamsyn-font/download/tamsyn-font-${version}.tar.gz";
|
|
|
|
sha256 = "0kpjzdj8sv5871b8827mjgj9dswk75h94jj5iia2bds18ih1pglp";
|
|
|
|
};
|
|
|
|
|
2020-02-16 00:50:14 +00:00
|
|
|
nativeBuildInputs = [ fontforge mkfontscale ];
|
2019-03-13 03:45:19 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
tar -xzf $src --strip-components=1
|
|
|
|
'';
|
|
|
|
|
2020-02-16 00:50:14 +00:00
|
|
|
postBuild = ''
|
|
|
|
# convert pcf fonts to otb
|
|
|
|
for i in *.pcf; do
|
|
|
|
name=$(basename "$i" .pcf)
|
|
|
|
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$name.otb\")"
|
|
|
|
done
|
|
|
|
|
|
|
|
# compress pcf fonts
|
|
|
|
gzip -n -9 *.pcf
|
|
|
|
'';
|
|
|
|
|
2019-03-13 03:45:19 +00:00
|
|
|
installPhase = ''
|
2020-02-16 00:50:14 +00:00
|
|
|
install -m 644 -D *.pcf.gz -t "$out/share/fonts/misc"
|
|
|
|
install -m 644 -D *.psf.gz -t "$out/share/consolefonts"
|
|
|
|
install -m 644 -D *.otb -t "$otb/share/fonts/misc"
|
|
|
|
mkfontdir "$out/share/fonts/misc"
|
|
|
|
mkfontdir "$otb/share/fonts/misc"
|
2019-03-13 03:45:19 +00:00
|
|
|
'';
|
|
|
|
|
2020-02-16 00:50:14 +00:00
|
|
|
outputs = [ "out" "otb" ];
|
2019-03-13 03:45:19 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A monospace bitmap font aimed at programmers";
|
|
|
|
longDescription = ''Tamsyn is a monospace bitmap font, primarily aimed at
|
|
|
|
programmers. It was derived from Gilles Boccon-Gibod's MonteCarlo. Tamsyn
|
|
|
|
font was further inspired by Gohufont, Terminus, Dina, Proggy, Fixedsys, and
|
2019-05-13 02:55:32 +01:00
|
|
|
Consolas.
|
2019-03-13 03:45:19 +00:00
|
|
|
'';
|
|
|
|
homepage = http://www.fial.com/~scott/tamsyn-font/;
|
|
|
|
downloadPage = http://www.fial.com/~scott/tamsyn-font/download;
|
|
|
|
license = licenses.free;
|
|
|
|
maintainers = [ maintainers.rps ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|