2021-12-06 16:07:01 +00:00
|
|
|
{ python3Packages, lib, fetchFromGitHub }:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "nerd-font-patcher";
|
2022-09-11 15:47:08 +00:00
|
|
|
version = "2.2.2";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
# This uses a sparse checkout because the repo is >2GB without it
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-03-05 16:20:37 +00:00
|
|
|
owner = "ryanoasis";
|
|
|
|
repo = "nerd-fonts";
|
|
|
|
rev = "v${version}";
|
2022-11-27 09:42:12 +00:00
|
|
|
sparseCheckout = [
|
|
|
|
"font-patcher"
|
|
|
|
"/src/glyphs"
|
|
|
|
];
|
2022-09-11 15:47:08 +00:00
|
|
|
sha256 = "sha256-boZUd1PM8puc9BTgOwCJpkfk6VMdXLsIyp+fQmW/ZqI=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [ fontforge ];
|
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i font-patcher \
|
2022-09-11 15:47:08 +00:00
|
|
|
-e 's,__dir__ + "/src,"'$out'/share/nerd-font-patcher,'
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-09-11 15:47:08 +00:00
|
|
|
mkdir -p $out/bin $out/share/nerd-font-patcher
|
|
|
|
install -Dm755 font-patcher $out/bin/nerd-font-patcher
|
|
|
|
cp -ra src/glyphs $out/share/nerd-font-patcher
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Font patcher to generate Nerd font";
|
|
|
|
homepage = "https://nerdfonts.com/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ck3d ];
|
|
|
|
};
|
|
|
|
}
|