nerd-font-patcher: 2.2.2 -> 3.0.1
This commit is contained in:
parent
d9005f04d2
commit
3d6d1d4d6b
|
@ -1,19 +1,13 @@
|
||||||
{ python3Packages, lib, fetchFromGitHub }:
|
{ python3Packages, lib, fetchzip }:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "nerd-font-patcher";
|
pname = "nerd-font-patcher";
|
||||||
version = "2.2.2";
|
version = "3.0.1";
|
||||||
|
|
||||||
# This uses a sparse checkout because the repo is >2GB without it
|
src = fetchzip {
|
||||||
src = fetchFromGitHub {
|
url = "https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/FontPatcher.zip";
|
||||||
owner = "ryanoasis";
|
sha256 = "sha256-kh3zQ0lXCmiO72ZXwvLm7LGUZu0hg8G8TG+pknkK1yo=";
|
||||||
repo = "nerd-fonts";
|
stripRoot = false;
|
||||||
rev = "v${version}";
|
|
||||||
sparseCheckout = [
|
|
||||||
"font-patcher"
|
|
||||||
"/src/glyphs"
|
|
||||||
];
|
|
||||||
sha256 = "sha256-boZUd1PM8puc9BTgOwCJpkfk6VMdXLsIyp+fQmW/ZqI=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ fontforge ];
|
propagatedBuildInputs = with python3Packages; [ fontforge ];
|
||||||
|
@ -22,15 +16,19 @@ python3Packages.buildPythonApplication rec {
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i font-patcher \
|
sed -i font-patcher \
|
||||||
-e 's,__dir__ + "/src,"'$out'/share/nerd-font-patcher,'
|
-e 's,__dir__ + "/src,"'$out'/share/,'
|
||||||
|
sed -i font-patcher \
|
||||||
|
-e 's,/bin/scripts/name_parser,/../lib/name_parser,'
|
||||||
'';
|
'';
|
||||||
|
# Note: we cannot use $out for second substitution
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/nerd-font-patcher
|
mkdir -p $out/bin $out/share $out/lib
|
||||||
install -Dm755 font-patcher $out/bin/nerd-font-patcher
|
install -Dm755 font-patcher $out/bin/nerd-font-patcher
|
||||||
cp -ra src/glyphs $out/share/nerd-font-patcher
|
cp -ra src/glyphs $out/share/
|
||||||
|
cp -ra bin/scripts/name_parser $out/lib/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue