barlow: use installFonts hook

This commit is contained in:
pancaek
2026-01-27 10:30:27 -08:00
parent ed2072a520
commit 18879293e2
+10 -14
View File
@@ -2,30 +2,26 @@
lib,
stdenvNoCC,
fetchFromGitHub,
installFonts,
}:
stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "barlow";
version = "1.422";
outputs = [
"out"
"webfont"
];
src = fetchFromGitHub {
owner = "jpt";
repo = "barlow";
tag = version;
tag = finalAttrs.version;
hash = "sha256-FG68o6qN/296RhSNDHFXYXbkhlXSZJgGhVjzlJqsksY=";
};
installPhase = ''
runHook preInstall
install -Dm644 fonts/otf/*.otf -t $out/share/fonts/opentype
install -Dm644 fonts/ttf/*.ttf fonts/gx/*.ttf -t $out/share/fonts/truetype
install -Dm644 fonts/eot/*.eot -t $out/share/fonts/eot
install -Dm644 fonts/woff/*.woff -t $out/share/fonts/woff
install -Dm644 fonts/woff2/*.woff2 -t $out/share/fonts/woff2
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
description = "Grotesk variable font superfamily";
@@ -34,4 +30,4 @@ stdenvNoCC.mkDerivation rec {
maintainers = [ ];
platforms = lib.platforms.all;
};
}
})