2022-03-30 09:31:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fontforge, python3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rictydiminished-with-firacode";
|
|
|
|
version = "1.2.2";
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hakatashi";
|
|
|
|
repo = "RictyDiminished-with-FiraCode";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-twh3yLAM4MUjWzSDNmo8gNIRf01hieXeOS334sNdFk4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Make builds more reproducible
|
|
|
|
substituteInPlace apply-feature.py --replace \
|
|
|
|
'ricty = ttLib.TTFont(options.in_font)' \
|
|
|
|
'ricty = ttLib.TTFont(options.in_font, recalcTimestamp=False)'
|
|
|
|
substituteInPlace build.py --replace \
|
|
|
|
'datetime.date.today()' \
|
|
|
|
'datetime.date.fromtimestamp(float(os.environ["SOURCE_DATE_EPOCH"]))'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -m444 -Dt $out/share/fonts/rictydiminished-with-firacode *.ttf
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
(python3.withPackages (ps: [
|
|
|
|
ps.jinja2
|
|
|
|
ps.fonttools
|
|
|
|
ps.fontforge
|
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/hakatashi/RictyDiminished-with-FiraCode";
|
|
|
|
description = "The best Japanese programming font meets the awesome ligatures of Firacode";
|
|
|
|
license = licenses.ofl;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ mt-caret ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|