remove NerdFont patch

This commit is contained in:
Sean Buckley 2022-11-10 14:52:58 -05:00
parent 3c7425da9e
commit b9f6c5f13c
2 changed files with 3 additions and 35 deletions

View file

@ -25,7 +25,9 @@ with lib;
MOUSE_DPI=600@1000
'';
fonts.fonts = [ pkgs.bck-nerdfont ];
fonts.fonts = [
(pkgs.nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
];
environment.variables.MOZ_ENABLE_WAYLAND = "1";
environment.variables.MOZ_USE_XINPUT2 = "1";

View file

@ -1,34 +0,0 @@
{ nerdfonts
, python3
, runCommand
, writeScript
}:
let
py = python3.withPackages (p: [ p.fontforge ]);
src = nerdfonts.override { fonts = [ "DejaVuSansMono" ]; };
# Stick a rectangle on the left edge of the
# powerline symbol to avoid anti-aliasing artifacts
postprocess = writeScript "postprocess.py" ''
#!${py}/bin/python
import fontforge, psMat, sys, os
f = fontforge.open(sys.argv[1])
glyph = f[0xE0B0]
bb = glyph.boundingBox()
pen = glyph.glyphPen(replace=False)
pen.moveTo(0, bb[1])
pen.lineTo(0, bb[3])
pen.lineTo(-150, bb[3])
pen.lineTo(-150, bb[1])
pen.closePath()
os.unlink(sys.argv[1])
f.generate(sys.argv[1])
'';
in
runCommand "bck-nerdfont" { inherit src; } ''
find $src -name '*Complete.ttf' -exec install -D -t $out/share/fonts/truetype {} \;
find $out -name '*Complete.ttf' -exec ${postprocess} {} \;
''