evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ri / rictydiminished-with-firacode / package.nix
blobd5ff8b1513b115b8f9867f195effcd0da9b39c66
1 { lib, stdenv, fetchFromGitHub, fontforge, python3 }:
3 stdenv.mkDerivation rec {
4   pname = "rictydiminished-with-firacode";
5   version = "1.2.2";
7   src = fetchFromGitHub {
8     owner = "hakatashi";
9     repo = "RictyDiminished-with-FiraCode";
10     rev = version;
11     hash = "sha256-twh3yLAM4MUjWzSDNmo8gNIRf01hieXeOS334sNdFk4=";
12     fetchSubmodules = true;
13   };
15   postPatch = ''
16     # Make builds more reproducible
17     substituteInPlace apply-feature.py --replace \
18       'ricty = ttLib.TTFont(options.in_font)' \
19       'ricty = ttLib.TTFont(options.in_font, recalcTimestamp=False)'
20     substituteInPlace build.py --replace \
21       'datetime.date.today()' \
22       'datetime.date.fromtimestamp(float(os.environ["SOURCE_DATE_EPOCH"]))'
23   '';
25   installPhase = ''
26     runHook preInstall
28     install -m444 -Dt $out/share/fonts/rictydiminished-with-firacode *.ttf
30     runHook postInstall
31   '';
33   nativeBuildInputs = [
34     (python3.withPackages (ps: [
35       ps.jinja2
36       ps.fonttools
37       ps.fontforge
38     ]))
39   ];
41   meta = with lib; {
42     homepage = "https://github.com/hakatashi/RictyDiminished-with-FiraCode";
43     description = "Best Japanese programming font meets the awesome ligatures of Firacode";
44     license = licenses.ofl;
45     platforms = platforms.all;
46     maintainers = with maintainers; [ mt-caret ];
47   };