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