2020-02-24 03:10:20 +01:00
|
|
|
{ stdenv, fetchgit, fontforge, python3 }:
|
2017-06-10 01:29:36 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "rictydiminished-with-firacode";
|
2020-02-24 03:10:20 +01:00
|
|
|
version = "1.2.2";
|
2019-12-25 23:12:01 +01:00
|
|
|
|
2017-06-10 01:29:36 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/hakatashi/RictyDiminished-with-FiraCode.git";
|
2019-12-25 23:12:01 +01:00
|
|
|
rev = version;
|
2020-06-01 10:59:41 +02:00
|
|
|
sha256 = "0khnbp1y5xrd77gfb2b19mzi3ll07im3d0rlbciwbq0cn347f25p";
|
2017-06-10 01:29:36 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2019-12-25 23:12:01 +01:00
|
|
|
postPatch = ''
|
|
|
|
# Make builds more reproducible
|
2017-08-12 16:22:45 +02:00
|
|
|
substituteInPlace apply-feature.py --replace \
|
|
|
|
'ricty = ttLib.TTFont(options.in_font)' \
|
|
|
|
'ricty = ttLib.TTFont(options.in_font, recalcTimestamp=False)'
|
2020-02-24 03:10:20 +01:00
|
|
|
substituteInPlace build.py --replace \
|
2017-08-12 16:22:45 +02:00
|
|
|
'datetime.date.today()' \
|
|
|
|
'datetime.date.fromtimestamp(float(os.environ["SOURCE_DATE_EPOCH"]))'
|
2017-06-10 01:29:36 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-12-25 23:12:01 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-05-13 05:54:44 +02:00
|
|
|
install -m444 -Dt $out/share/fonts/rictydiminished-with-firacode *.ttf
|
2019-12-25 23:12:01 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-06-10 01:29:36 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2019-11-04 16:23:34 +01:00
|
|
|
(python3.withPackages (ps: [
|
2017-06-10 01:29:36 +02:00
|
|
|
ps.jinja2
|
|
|
|
ps.fonttools
|
2020-02-24 03:10:20 +01:00
|
|
|
ps.fontforge
|
2017-06-10 01:29:36 +02:00
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-12-25 23:12:01 +01:00
|
|
|
homepage = "https://github.com/hakatashi/RictyDiminished-with-FiraCode";
|
2020-02-24 03:10:20 +01:00
|
|
|
description = "The best Japanese programming font meets the awesome ligatures of Firacode";
|
2017-06-10 01:29:36 +02:00
|
|
|
license = licenses.ofl;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ mt-caret ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|