data/fonts: make derivations fixed-outputs (group of fontforge compiled fonts)

This commit is contained in:
Volth 2017-08-12 14:22:45 +00:00
parent 38c14d7132
commit 04dacfbf1c
6 changed files with 40 additions and 1 deletions

View File

@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
cp -v AUTHORS ChangeLog COPYING License.txt README "$out/doc/${name}" || true
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "18brmw0h4hjq1m2l0abwc3zmib4rnfalpywdk68djm711zldxr76";
meta = with stdenv.lib; {
description = "Fork of Inconsolata font, with proper support of Cyrillic and Greek";
longDescription = ''

View File

@ -8,11 +8,14 @@ stdenv.mkDerivation rec {
sha256 = "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v";
};
setSourceRoot = "sourceRoot=`pwd`";
sourceRoot = ".";
nativeBuildInputs = [ fontforge ];
buildPhase = ''
# <nixpkgs/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh> set it to mtime of ./env-vars, i.e. the current time
export SOURCE_DATE_EPOCH=$(stat -c '%Y' ChangeLog.txt)
for i in *.sfd; do
fontforge -lang=ff -c \
'Open($1);
@ -40,6 +43,10 @@ stdenv.mkDerivation rec {
cp *.map $out/share/texmf/fonts/map
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1mj0j0hkp8pn7jcs4pvcan6whba60bfd671g3vhx3s9kxwf7xjvr";
meta = {
description = "Linux Libertine Fonts";
homepage = http://linuxlibertine.sf.net;

View File

@ -31,6 +31,10 @@ stdenv.mkDerivation rec {
cp -va Readme.md $out/share/doc
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0ml61zym03n175gpx1gr7812f45lyjm0vzgbqjx91fi58rqlazvm";
meta = with stdenv.lib; {
homepage = http://larsenwork.com/monoid;
description = "Customisable coding font with alternates, ligatures and contextual positioning";

View File

@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
};
buildPhase = ''
substituteInPlace apply-feature.py --replace \
'ricty = ttLib.TTFont(options.in_font)' \
'ricty = ttLib.TTFont(options.in_font, recalcTimestamp=False)'
substituteInPlace build-py3.py --replace \
'datetime.date.today()' \
'datetime.date.fromtimestamp(float(os.environ["SOURCE_DATE_EPOCH"]))'
make
'';
@ -28,6 +35,10 @@ 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

@ -23,6 +23,11 @@ stdenv.mkDerivation rec {
cp *.svg "$out/share/fonts/svg"
cp *.woff "$out/share/fonts/web"
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "03zvczdka665zcyf9fjrnx434mwpr5q8396j34kjmc67w7nhc49r";
meta = {
inherit version;
description = ''Bitmapped character-art-friendly Unicode fonts'';

View File

@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
postPatch = ''
rm *.otf
substituteInPlace tools/postprocess.py --replace \
'font = ttLib.TTFont(sys.argv[1])' \
'font = ttLib.TTFont(sys.argv[1], recalcTimestamp=False)'
'';
installPhase = ''
@ -22,6 +26,10 @@ stdenv.mkDerivation rec {
cp *.otf $out/share/fonts/opentype
'';
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";