Alex James 89cba04369
nerd-font-patcher: update patches for 3.4.0
One of the commits included in 3.4.0 [1] broke the patch to update the
path to the glyphs directory [2]. Replace the `postPatch` hook with an
explicit patch to update the paths in the font-patcher script.

[1]: 34a14990b0
[2]: https://github.com/NixOS/nixpkgs/pull/409580#issuecomment-2903671914
2025-05-23 13:43:32 -05:00

42 lines
954 B
Nix

{
python3Packages,
lib,
fetchzip,
}:
python3Packages.buildPythonApplication rec {
pname = "nerd-font-patcher";
version = "3.4.0";
src = fetchzip {
url = "https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/FontPatcher.zip";
sha256 = "sha256-koZj0Tn1HtvvSbQGTc3RbXQdUU4qJwgClOVq1RXW6aM=";
stripRoot = false;
};
propagatedBuildInputs = with python3Packages; [ fontforge ];
format = "other";
patches = [
./use-nix-paths.patch
];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin $out/share $out/lib
install -Dm755 font-patcher $out/bin/nerd-font-patcher
cp -ra src/glyphs $out/share/
cp -ra bin/scripts/name_parser $out/lib/
'';
meta = with lib; {
description = "Font patcher to generate Nerd font";
mainProgram = "nerd-font-patcher";
homepage = "https://nerdfonts.com/";
license = licenses.mit;
maintainers = with maintainers; [ ck3d ];
};
}