mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 18:12:46 +00:00
Merge pull request #142695 from ck3d/add-nerd-font-patcher
nerd-font-patcher: init at 2.1.0
This commit is contained in:
commit
ed71268f52
41
pkgs/applications/misc/nerd-font-patcher/default.nix
Normal file
41
pkgs/applications/misc/nerd-font-patcher/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ python3Packages, lib, fetchFromGitHub }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "nerd-font-patcher";
|
||||
version = "2.1.0";
|
||||
|
||||
# The size of the nerd fonts repository is bigger than 2GB, because it
|
||||
# contains a lot of fonts and the patcher.
|
||||
# until https://github.com/ryanoasis/nerd-fonts/issues/484 is not fixed,
|
||||
# we download the patcher from an alternative repository
|
||||
src = fetchFromGitHub {
|
||||
owner = "betaboon";
|
||||
repo = "nerd-fonts-patcher";
|
||||
rev = "180684d7a190f75fd2fea7ca1b26c6540db8d3c0";
|
||||
sha256 = "sha256-FAbdLf0XiUXGltAgmq33Wqv6PFo/5qCv62UxXnj3SgI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ fontforge ];
|
||||
|
||||
format = "other";
|
||||
|
||||
postPatch = ''
|
||||
sed -i font-patcher \
|
||||
-e 's,__dir__ + "/src,"'$out'/share/${pname},'
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm755 font-patcher $out/bin/${pname}
|
||||
cp -ra src/glyphs $out/share/${pname}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Font patcher to generate Nerd font";
|
||||
homepage = "https://nerdfonts.com/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ck3d ];
|
||||
};
|
||||
}
|
|
@ -26771,6 +26771,8 @@ with pkgs;
|
|||
|
||||
neocomp = callPackage ../applications/window-managers/neocomp { };
|
||||
|
||||
nerd-font-patcher = callPackage ../applications/misc/nerd-font-patcher { };
|
||||
|
||||
newsflash = callPackage ../applications/networking/feedreaders/newsflash { };
|
||||
|
||||
nicotine-plus = callPackage ../applications/networking/soulseek/nicotine-plus { };
|
||||
|
|
Loading…
Reference in a new issue