forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ lib, stdenv, fetchgit, fontforge, python3 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rictydiminished-with-firacode";
|
|
version = "1.2.2";
|
|
|
|
src = fetchgit {
|
|
url = "https://github.com/hakatashi/RictyDiminished-with-FiraCode.git";
|
|
rev = version;
|
|
sha256 = "0khnbp1y5xrd77gfb2b19mzi3ll07im3d0rlbciwbq0cn347f25p";
|
|
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 = "The best Japanese programming font meets the awesome ligatures of Firacode";
|
|
license = licenses.ofl;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ mt-caret ];
|
|
};
|
|
}
|
|
|