From fb04a900f056c5a618538047cba0da3976f6870a Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Wed, 7 Oct 2026 15:43:10 +0100 Subject: [PATCH] nerd-font-patcher: move path fix to fixup phase Fix the path to the `glyphnames.json` file in the pre-fixup phase rather than post-patch, and provide the full explicit path rather than a relative path. --- pkgs/by-name/ne/nerd-font-patcher/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ne/nerd-font-patcher/package.nix b/pkgs/by-name/ne/nerd-font-patcher/package.nix index e338473924c70..f26d812555a2c 100644 --- a/pkgs/by-name/ne/nerd-font-patcher/package.nix +++ b/pkgs/by-name/ne/nerd-font-patcher/package.nix @@ -21,10 +21,6 @@ python3Packages.buildPythonApplication (finalAttrs: { patches = [ ./use-nix-paths.patch ]; - postPatch = '' - substituteInPlace font-patcher \ - --replace-fail "'glyphnames.json'" "'../share/glyphnames.json'" - ''; dontBuild = true; @@ -36,6 +32,11 @@ python3Packages.buildPythonApplication (finalAttrs: { cp -ra bin/scripts/name_parser $out/lib/ ''; + preFixup = '' + substituteInPlace "$out"/bin/nerd-font-patcher \ + --replace-fail "'glyphnames.json'" "'$out/share/glyphnames.json'" + ''; + meta = { description = "Font patcher to generate Nerd font"; mainProgram = "nerd-font-patcher";