2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, fontforge }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2022-10-06 18:32:54 +00:00
|
|
|
pname = "linux-libertine";
|
|
|
|
version = "5.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/linuxlibertine/5.3.0/LinLibertineSRC_5.3.0_2012_07_02.tgz";
|
2022-10-06 18:32:54 +00:00
|
|
|
hash = "sha256-G+xDYKJvHPMzwnktkg9cpNTv9E9d5QFgDjReuKH57HQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ fontforge ];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPhase = ''
|
2022-10-06 18:32:54 +00:00
|
|
|
runHook preBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
for i in *.sfd; do
|
|
|
|
fontforge -lang=ff -c \
|
|
|
|
'Open($1);
|
|
|
|
ScaleToEm(1000);
|
|
|
|
Reencode("unicode");
|
|
|
|
Generate($1:r + ".ttf");
|
|
|
|
Generate($1:r + ".otf");
|
|
|
|
Reencode("TeX-Base-Encoding");
|
|
|
|
Generate($1:r + ".afm");
|
|
|
|
Generate($1:r + ".pfm");
|
|
|
|
Generate($1:r + ".pfb");
|
|
|
|
Generate($1:r + ".map");
|
|
|
|
Generate($1:r + ".enc");
|
|
|
|
' $i;
|
|
|
|
done
|
2022-10-06 18:32:54 +00:00
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-10-06 18:32:54 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
install -m444 -Dt $out/share/fonts/opentype/public *.otf
|
|
|
|
install -m444 -Dt $out/share/fonts/truetype/public *.ttf
|
|
|
|
install -m444 -Dt $out/share/fonts/type1/public *.pfb
|
|
|
|
install -m444 -Dt $out/share/texmf/fonts/enc *.enc
|
|
|
|
install -m444 -Dt $out/share/texmf/fonts/map *.map
|
2022-10-06 18:32:54 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Linux Libertine Fonts";
|
|
|
|
homepage = "http://linuxlibertine.sf.net";
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ erdnaxe ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.ofl;
|
|
|
|
};
|
|
|
|
}
|