Unverified Commit 1502b62b authored by Leiser Fernández Gallo's avatar Leiser Fernández Gallo Committed by GitHub
Browse files

kitty: darwin-fix (#338033)

Copy nerdfont to avoid fc-match heuristic on mac
parent 35aba605
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ buildPythonApplication rec {
    sphinx-inline-tabs
    go
    fontconfig
    (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
  ] ++ lib.optionals stdenv.isDarwin [
    imagemagick
    libicns  # For the png2icns tool.
@@ -137,6 +136,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}