From 0c3d12a3e5d4077cf7fee84fcb177237ee8daddf Mon Sep 17 00:00:00 2001 From: leiserfg Date: Wed, 28 Aug 2024 23:17:02 +0200 Subject: [PATCH] Copy nerdfont to avoid fc-match heuristic on mac --- pkgs/applications/terminal-emulators/kitty/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 7ccaf0307bde5..53cc4af262b42 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -83,7 +83,6 @@ buildPythonApplication rec { sphinx-inline-tabs go fontconfig - (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) ] ++ lib.optionals stdenv.isDarwin [ imagemagick libicns # For the png2icns tool. @@ -132,6 +131,11 @@ buildPythonApplication rec { ''; in '' runHook preBuild + + # Add the font by hand because fontconfig does not finds it in darwin + mkdir ./fonts/ + cp "${(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})}/share/fonts/truetype/NerdFonts/SymbolsNerdFontMono-Regular.ttf" ./fonts/ + ${ lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "export MACOSX_DEPLOYMENT_TARGET=11" } ${if stdenv.isDarwin then '' ${python.pythonOnBuildForHost.interpreter} setup.py build ${darwinOptions}