2020-02-10 18:27:31 +00:00
|
|
|
{ stdenv, fetchzip, mkfontscale }:
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "profont";
|
|
|
|
version = "2019-11";
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
# Note: stripRoot doesn't work because the archive
|
|
|
|
# constains the metadata directory `__MACOSX`.
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://tobiasjung.name/downloadfile.php?file=profont-x11.zip";
|
|
|
|
sha256 = "12dbm87wvcpmn7nzgzwlk45cybp091diara8blqm6129ps27z6kb";
|
|
|
|
stripRoot = false;
|
|
|
|
} + /profont-x11;
|
2017-08-10 20:43:49 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
srcOtb = fetchzip {
|
|
|
|
url = "https://tobiasjung.name/downloadfile.php?file=profont-otb.zip";
|
|
|
|
sha256 = "18rfhfqrsj3510by0w1a7ak5as6r2cxh8xv02xc1y30mfa6g24x6";
|
|
|
|
stripRoot = false;
|
|
|
|
} + /profont-otb;
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
dontBuild = true;
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
nativeBuildInputs = [ mkfontscale ];
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/share/fonts/misc"
|
2017-08-10 20:43:49 +01:00
|
|
|
for f in *.pcf; do
|
2020-02-10 18:27:31 +00:00
|
|
|
gzip -n -9 -c "$f" > "$out/share/fonts/misc/$f.gz"
|
2017-08-10 20:43:49 +01:00
|
|
|
done
|
2020-02-10 18:27:31 +00:00
|
|
|
install -D -m 644 LICENSE -t "$out/share/doc/$pname"
|
|
|
|
mkfontdir "$out/share/fonts/misc"
|
|
|
|
|
|
|
|
cd $srcOtb
|
|
|
|
install -D -m 644 profontn.otb -t $otb/share/fonts/misc
|
|
|
|
mkfontdir "$otb/share/fonts/misc"
|
2017-08-10 20:43:49 +01:00
|
|
|
'';
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
outputs = [ "out" "otb" ];
|
2016-04-13 15:42:06 +01:00
|
|
|
|
2020-02-10 18:27:31 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://tobiasjung.name/profont/";
|
2016-04-13 15:42:06 +01:00
|
|
|
description = "A monospaced font created to be a most readable font for programming";
|
2020-02-10 18:27:31 +00:00
|
|
|
maintainers = with maintainers; [ myrl ];
|
2016-04-13 15:42:06 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2020-02-10 18:27:31 +00:00
|
|
|
|
2016-04-13 15:42:06 +01:00
|
|
|
}
|