Merge pull request #61422 from volth/fontforge-made-fonts-are-not-fo

data/fonts: fonts made with fontforge are not fixed-output
This commit is contained in:
Michael Raskin 2019-05-13 15:23:33 +00:00 committed by GitHub
commit ab18644e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 86 deletions

View File

@ -38,38 +38,25 @@ let
preBuild = "patchShebangs scripts";
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp build/*.ttf $out/share/fonts/truetype/
'';
installPhase = "install -m444 -Dt $out/share/fonts/truetype build/*.ttf";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1cxprzsr826d888ha4zxx28i9jfj1k74q9kfv3v2rf603460iha9";
inherit meta;
};
minimal = stdenv.mkDerivation {
name = "dejavu-fonts-minimal-${version}";
buildCommand = ''
install -D ${full-ttf}/share/fonts/truetype/DejaVuSans.ttf $out/share/fonts/truetype/DejaVuSans.ttf
install -m444 -Dt $out/share/fonts/truetype ${full-ttf}/share/fonts/truetype/DejaVuSans.ttf
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0ybsynp9904vmd3qv5b438swhx43m5q6gfih3i32iw33rks8nkpj";
inherit meta;
};
in stdenv.mkDerivation {
name = "dejavu-fonts-${version}";
buildCommand = ''
mkdir -p $out/share/fonts/truetype
cp ${full-ttf}/share/fonts/truetype/*.ttf $out/share/fonts/truetype/
install -m444 -Dt $out/share/fonts/truetype ${full-ttf}/share/fonts/truetype/*.ttf
ln -s --relative --force --target-directory=$out/share/fonts/truetype ${minimal}/share/fonts/truetype/DejaVuSans.ttf
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "15l93xm9mg2ziaxv4nqy2a4jaz54d05xf0hfz1h84bclzb882llh";
inherit meta;
passthru.minimal = minimal;
passthru = { inherit minimal full-ttf; };
}

View File

@ -14,20 +14,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ fontforge ];
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp -v $(find . -name '*.ttf') $out/share/fonts/truetype
mkdir -p $out/share/fonts/opentype
cp -v $(find . -name '*.otf') $out/share/fonts/opentype
mkdir -p "$out/doc/${name}"
cp -v AUTHORS ChangeLog COPYING License.txt README "$out/doc/${name}" || true
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
find . -name '*.otf' -exec install -m444 -Dt $out/share/fonts/opentype {} \;
install -m444 -Dt $out/share/doc/${name} LICENSE README
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "18brmw0h4hjq1m2l0abwc3zmib4rnfalpywdk68djm711zldxr76";
meta = with stdenv.lib; {
description = "Fork of Inconsolata font, with proper support of Cyrillic and Greek";
longDescription = ''
@ -57,6 +48,5 @@ stdenv.mkDerivation rec {
license = licenses.ofl;
homepage = https://github.com/MihailJP/Inconsolata-LGC;
maintainers = with maintainers; [ avnik rht ];
platforms = platforms.linux;
};
}

View File

@ -31,23 +31,16 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
mkdir -p $out/share/fonts/{opentype,truetype,type1}/public
mkdir -p $out/share/texmf/fonts/{enc,map}
cp *.otf $out/share/fonts/opentype/public
cp *.ttf $out/share/fonts/truetype/public
cp *.pfb $out/share/fonts/type1/public
cp *.enc $out/share/texmf/fonts/enc
cp *.map $out/share/texmf/fonts/map
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
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1mj0j0hkp8pn7jcs4pvcan6whba60bfd671g3vhx3s9kxwf7xjvr";
meta = with stdenv.lib; {
description = "Linux Libertine Fonts";
homepage = http://linuxlibertine.sf.net;
platforms = platforms.linux;
maintainers = [ maintainers.volth ];
license = licenses.ofl;
};

View File

@ -24,15 +24,10 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
mkdir -p $out/share/{doc,fonts/truetype}
cp -va _release/* $out/share/fonts/truetype
cp -va Readme.md $out/share/doc
install -m444 -Dt $out/share/fonts/truetype _release/*
install -m444 -Dt $out/share/doc Readme.md
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0lbipgygiva3gg1pqw07phpnnf0s6ka9vqdk1pw7bkybjw3f7wzm";
meta = with stdenv.lib; {
homepage = http://larsenwork.com/monoid;
description = "Customisable coding font with alternates, ligatures and contextual positioning";

View File

@ -4,7 +4,7 @@ let
inherit (python3.pkgs) fonttools;
common =
{ version, repo, sha256, nativeBuildInputs, postPatch ? null, outputHash }:
{ version, repo, sha256, nativeBuildInputs, postPatch ? null }:
stdenv.mkDerivation rec {
pname = "liberation-fonts";
inherit version;
@ -18,17 +18,15 @@ let
inherit nativeBuildInputs postPatch;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp -v $( find . -name '*.ttf') $out/share/fonts/truetype
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
mkdir -p "$out/share/doc/${pname}-${version}"
cp -v AUTHORS ChangeLog COPYING License.txt README "$out/share/doc/${pname}-${version}" || true
install -m444 -Dt $out/share/doc/${pname}-${version} AUTHORS || true
install -m444 -Dt $out/share/doc/${pname}-${version} ChangeLog || true
install -m444 -Dt $out/share/doc/${pname}-${version} COPYING || true
install -m444 -Dt $out/share/doc/${pname}-${version} License.txt || true
install -m444 -Dt $out/share/doc/${pname}-${version} README || true
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
inherit outputHash;
meta = with stdenv.lib; {
description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
longDescription = ''
@ -48,7 +46,6 @@ let
maintainers = [
maintainers.raskin
];
platforms = platforms.unix;
};
};
@ -58,7 +55,6 @@ in {
version = "1.07.5";
nativeBuildInputs = [ fontforge ];
sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v";
outputHash = "16jn17p22z2vip58aza2dfg1ri31ki6z3hsnmidfqfi7v8k83vq4";
};
liberation_ttf_v2 = common rec {
repo = "liberation-fonts";
@ -70,6 +66,5 @@ in {
'font = ttLib.TTFont(fontfile, recalcTimestamp=False)'
'';
sha256 = "14bn1zlhyr4qaz5z2sx4h115pnbd41ix1vky8fxm2lx76xrjjiaa";
outputHash = "14c0c5n4vzd5y0hf9jkh48h12kkd8hlg94npbmv41j449g6wv6vn";
};
}

View File

@ -22,8 +22,7 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
mkdir -p $out/share/fonts/rictydiminished-with-firacode
cp *.ttf $out/share/fonts/rictydiminished-with-firacode
install -m444 -Dt $out/share/fonts/rictydiminished-with-firacode *.ttf
'';
nativeBuildInputs = [
@ -35,10 +34,6 @@ stdenv.mkDerivation rec {
]))
];
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "09ldviapljn4bb1mcxap2pkz7cq3wr2k2qialbnav5y7ii82acd4";
meta = with stdenv.lib; {
homepage = https://github.com/hakatashi/RictyDiminished-with-FiraCode;
description = "The best Japanese programming font meets the awesone ligatures of Firacode";

View File

@ -8,25 +8,19 @@ stdenv.mkDerivation rec {
url = "http://pelulamu.net/${pname}/${name}-src.tar.gz";
sha256 = "0qcxcnqz2nlwfzlrn115kkp3n8dd7593h762vxs6vfqm13i39lq1";
};
nativeBuildInputs = [perl bdftopcf perlPackages.TextCharWidth fontforge
nativeBuildInputs = [perl bdftopcf perlPackages.TextCharWidth fontforge
SDL SDL_image];
preConfigure = ''
patchShebangs .
'';
installPhase = ''
mkdir -p "$out/share/fonts"/{truetype,opentype,web,svg}
cp *.hex "$out/share/fonts/"
cp *.pcf "$out/share/fonts/"
cp *.ttf "$out/share/fonts/truetype"
cp *.otf "$out/share/fonts/opentype"
cp *.svg "$out/share/fonts/svg"
cp *.woff "$out/share/fonts/web"
install -m444 -Dt $out/share/fonts *.hex *.pcf
install -m444 -Dt $out/share/fonts/truetype *.ttf
install -m444 -Dt $out/share/fonts/opentype *.otf
install -m444 -Dt $out/share/fonts/svg *.svg
install -m444 -Dt $out/share/fonts/web *.woff
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "03zvczdka665zcyf9fjrnx434mwpr5q8396j34kjmc67w7nhc49r";
meta = {
inherit version;
description = ''Bitmapped character-art-friendly Unicode fonts'';
@ -34,7 +28,6 @@ stdenv.mkDerivation rec {
# version. The reduced version is public domain.
license = http://unifoundry.com/LICENSE.txt;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
homepage = http://pelulamu.net/unscii/;
};
}

View File

@ -22,14 +22,9 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
mkdir -p $out/share/fonts/opentype
cp *.otf $out/share/fonts/opentype
install -m444 -Dt $out/share/fonts/opentype *.otf
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "00xycmb9ka67j5s66nkng53y8q6362igisxz04zb58r2717jk50m";
meta = with stdenv.lib; {
homepage = https://github.com/khaledhosny/xits-math;
description = "OpenType implementation of STIX fonts with math support";