2022-03-15 10:25:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fontforge, python3 }:
|
2017-06-09 23:29:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00: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
|
|
|
|
2022-03-15 10:25:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hakatashi";
|
|
|
|
repo = "RictyDiminished-with-FiraCode";
|
2019-12-25 22:12:01 +00:00
|
|
|
rev = version;
|
2024-07-14 10:59:26 +00:00
|
|
|
hash = "sha256-twh3yLAM4MUjWzSDNmo8gNIRf01hieXeOS334sNdFk4=";
|
2017-06-09 23:29:36 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2019-12-25 22:12:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Make builds more reproducible
|
2017-08-12 14:22:45 +00: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 14:22:45 +00:00
|
|
|
'datetime.date.today()' \
|
|
|
|
'datetime.date.fromtimestamp(float(os.environ["SOURCE_DATE_EPOCH"]))'
|
2017-06-09 23:29:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-12-25 22:12:01 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-05-13 03:54:44 +00:00
|
|
|
install -m444 -Dt $out/share/fonts/rictydiminished-with-firacode *.ttf
|
2019-12-25 22:12:01 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-06-09 23:29:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2019-11-04 15:23:34 +00:00
|
|
|
(python3.withPackages (ps: [
|
2017-06-09 23:29:36 +00:00
|
|
|
ps.jinja2
|
|
|
|
ps.fonttools
|
2020-02-24 02:10:20 +00:00
|
|
|
ps.fontforge
|
2017-06-09 23:29:36 +00:00
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with 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 = "Best Japanese programming font meets the awesome ligatures of Firacode";
|
2017-06-09 23:29:36 +00:00
|
|
|
license = licenses.ofl;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ mt-caret ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|