oswald: use installFonts

This commit is contained in:
pancaek
2026-05-06 23:05:03 -07:00
parent f99e3d4c52
commit 8452a68839
+10 -4
View File
@@ -2,12 +2,18 @@
lib,
stdenvNoCC,
fetchFromGitHub,
installFonts,
}:
stdenvNoCC.mkDerivation {
pname = "oswald";
version = "4.103";
outputs = [
"out"
"webfont"
];
src = fetchFromGitHub {
owner = "googlefonts";
repo = "OswaldFont";
@@ -15,12 +21,12 @@ stdenvNoCC.mkDerivation {
hash = "sha256-yoUduWHuuKDQaJnQ+CgeMw1vp2lgn/OVPokSDzEU7yk=";
};
nativeBuildInputs = [ installFonts ];
preInstall = "rm -r legacy/";
installPhase = ''
runHook preInstall
install -Dm444 fonts/ttf/*.ttf -t $out/share/fonts/truetype
install -Dm444 fonts/variable/*.ttf -t $out/share/fonts/variable
runHook postInstall
'';