diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-04 11:23:36 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-04-06 16:36:22 -0400 |
commit | 8a5059e1cc717299b4e58459c70591e12db0fca2 (patch) | |
tree | 4ac8f6941ef9a4d895001f843fda39816de0fc9e /nixos/modules/config | |
parent | 6c5983a291530f040deb97881e80cca373a5b29e (diff) | |
download | nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.tar nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.tar.gz nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.tar.bz2 nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.tar.lz nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.tar.xz nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.tar.zst nixlib-8a5059e1cc717299b4e58459c70591e12db0fca2.zip |
fontconfig: only generate cache on native compilation
We can’t cross-compile the cache, so just skip it for now.
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/fonts/fontconfig.nix | 5 |
1 files changed, 5 insertions, 0 deletions
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 + # <cachedir> 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 <fontconfig> <!-- Font directories --> ${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)} + ${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) '' <!-- Pre-generated font caches --> <cachedir>${cache}</cachedir> ${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) '' <cachedir>${cache32}</cachedir> ''} + ''} </fontconfig> ''; |