From 8a5059e1cc717299b4e58459c70591e12db0fca2 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 4 Mar 2020 11:23:36 -0500 Subject: [PATCH] fontconfig: only generate cache on native compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can’t cross-compile the cache, so just skip it for now. --- nixos/modules/config/fonts/fontconfig.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index 3bfa1893a8ba..6ac64b0ec9c6 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -45,6 +45,9 @@ let # generate the font cache setting file for a fontconfig version # use latest when no version is passed + # When cross-compiling, we can’t generate the cache, so we skip the + # part. fontconfig still works but is a little slower in + # looking things up. makeCacheConf = { version ? null }: let fcPackage = if version == null @@ -60,11 +63,13 @@ let ${concatStringsSep "\n" (map (font: "${font}") config.fonts.fonts)} + ${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) '' ${cache} ${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) '' ${cache32} ''} + ''} '';