This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
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 ];
|
|
};
|
|
}
|