diff options
author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2020-07-15 09:22:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 09:22:34 +0200 |
commit | d8ec21929366863d6628d868d8422287cffa3a25 (patch) | |
tree | ad08f6b5e977feb17742b1c15a0e2545412e0f66 /pkgs/data | |
parent | 661ebced1b583f214d774dfdb570dde7e9885f08 (diff) | |
parent | 56ce016024f6c7a4f953aa8dfd4b4a3feda99371 (diff) |
Merge pull request #93051 from samuelgrf/fix/nerdfonts-no-winfonts
nerdfonts: disable Windows font variants (by default)
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/fonts/nerdfonts/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/data/fonts/nerdfonts/default.nix b/pkgs/data/fonts/nerdfonts/default.nix index 35f43c14df485..bf98effb1508e 100644 --- a/pkgs/data/fonts/nerdfonts/default.nix +++ b/pkgs/data/fonts/nerdfonts/default.nix @@ -5,6 +5,9 @@ # To select only certain fonts, put a list of strings to `fonts`: every key in # ./shas.nix is an optional font , fonts ? [] +# Whether to enable Windows font variants, their internal font name is limited +# to 31 characters +, enableWindowsFonts ? false }: let @@ -50,6 +53,10 @@ stdenv.mkDerivation rec { installPhase = '' find -name \*.otf -exec mkdir -p $out/share/fonts/opentype/NerdFonts \; -exec mv {} $out/share/fonts/opentype/NerdFonts \; find -name \*.ttf -exec mkdir -p $out/share/fonts/truetype/NerdFonts \; -exec mv {} $out/share/fonts/truetype/NerdFonts \; + ${lib.optionalString (! enableWindowsFonts) '' + rm -rfv $out/share/fonts/opentype/NerdFonts/*Windows\ Compatible.* + rm -rfv $out/share/fonts/truetype/NerdFonts/*Windows\ Compatible.* + ''} ''; meta = with stdenv.lib; { |