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