barlow: use installFonts hook
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user