Merge pull request #93051 from samuelgrf/fix/nerdfonts-no-winfonts
nerdfonts: disable Windows font variants (by default)
This commit is contained in:
commit
d8ec219293
@ -5,6 +5,9 @@
|
|||||||
# To select only certain fonts, put a list of strings to `fonts`: every key in
|
# To select only certain fonts, put a list of strings to `fonts`: every key in
|
||||||
# ./shas.nix is an optional font
|
# ./shas.nix is an optional font
|
||||||
, fonts ? []
|
, fonts ? []
|
||||||
|
# Whether to enable Windows font variants, their internal font name is limited
|
||||||
|
# to 31 characters
|
||||||
|
, enableWindowsFonts ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -50,6 +53,10 @@ stdenv.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
find -name \*.otf -exec mkdir -p $out/share/fonts/opentype/NerdFonts \; -exec mv {} $out/share/fonts/opentype/NerdFonts \;
|
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 \;
|
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; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user