blob: d5ff8b1513b115b8f9867f195effcd0da9b39c66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ lib, stdenv, fetchFromGitHub, fontforge, python3 }:
stdenv.mkDerivation rec {
pname = "rictydiminished-with-firacode";
version = "1.2.2";
src = fetchFromGitHub {
owner = "hakatashi";
repo = "RictyDiminished-with-FiraCode";
rev = version;
hash = "sha256-twh3yLAM4MUjWzSDNmo8gNIRf01hieXeOS334sNdFk4=";
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
]))
];
meta = with lib; {
homepage = "https://github.com/hakatashi/RictyDiminished-with-FiraCode";
description = "Best Japanese programming font meets the awesome ligatures of Firacode";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ mt-caret ];
};
}
|