smiley-sans: use installFonts hook (#505696)

This commit is contained in:
Pol Dellaiera
2026-04-05 20:57:32 +00:00
committed by GitHub
+11 -11
View File
@@ -3,25 +3,25 @@
stdenvNoCC,
fetchzip,
nix-update-script,
installFonts,
}:
stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "smiley-sans";
version = "2.0.1";
src = fetchzip {
url = "https://github.com/atelier-anchor/smiley-sans/releases/download/v${version}/smiley-sans-v${version}.zip";
url = "https://github.com/atelier-anchor/smiley-sans/releases/download/v${finalAttrs.version}/smiley-sans-v${finalAttrs.version}.zip";
sha256 = "sha256-p6DwX5MBPemAfV99L9ayLkEWro31ip4tf+wBQr8mkbs=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
install -Dm644 -t $out/share/fonts/opentype *.otf
install -Dm644 -t $out/share/fonts/truetype *.ttf
install -Dm644 -t $out/share/fonts/woff2 *.woff2
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
outputs = [
"out"
"webfont"
];
passthru.updateScript = nix-update-script { };
@@ -30,7 +30,7 @@ stdenvNoCC.mkDerivation rec {
homepage = "https://atelier-anchor.com/typefaces/smiley-sans/";
changelog = "https://github.com/atelier-anchor/smiley-sans/blob/main/CHANGELOG.md";
license = lib.licenses.ofl;
maintainers = [ ];
maintainers = with lib.maintainers; [ pancaek ];
platforms = lib.platforms.all;
};
}
})