fira-code: use installFonts

This commit is contained in:
pancaek
2026-03-04 20:22:35 -08:00
parent 2d2a986c1d
commit de800ded1d
+3 -8
View File
@@ -2,6 +2,7 @@
lib,
stdenvNoCC,
fetchzip,
installFonts,
useVariableFont ? true,
}:
@@ -16,15 +17,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
};
# only extract the variable font because everything else is a duplicate
installPhase = ''
runHook preInstall
preInstall = "cd ${lib.optionalString useVariableFont "variable_"}ttf";
install -Dm644 -t $out/share/fonts/truetype ${
if useVariableFont then "variable_ttf/*-VF.ttf" else "ttf/*.ttf"
}
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
homepage = "https://github.com/tonsky/FiraCode";