nixpkgs-suyu/pkgs/data/fonts/pretendard/default.nix
2022-07-01 23:32:54 +09:00

49 lines
1.3 KiB
Nix

{ lib, fetchzip }:
let
version = "1.3.3";
mkPretendard = { pname, typeface, sha256 }:
fetchzip {
name = "${pname}-${version}";
url = "https://github.com/orioncactus/pretendard/releases/download/v${version}/${typeface}-${version}.zip";
inherit sha256;
stripRoot = false;
postFetch = ''
mkdir -p $out/share/fonts/
install -Dm644 $out/public/static/*.otf -t $out/share/fonts/opentype
rm -rf $out/{public,web,LICENSE.txt}
'';
meta = with lib; {
homepage = "https://github.com/orioncactus/pretendard";
description = "An alternative font to system-ui for all platforms";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ sudosubin ];
};
};
in
{
pretendard = mkPretendard {
pname = "pretendard";
typeface = "Pretendard";
sha256 = "sha256-lRHRdCAg3i3+3Y6j0dCXUgwLdeS/VeI6KNkbDKchNEY=";
};
pretendard-jp = mkPretendard {
pname = "pretendard-jp";
typeface = "PretendardJP";
sha256 = "sha256-VgGt/WoaaJJDAzw+gUQVgTQ+q34bdAaKUB4cA9eU0dQ=";
};
pretendard-std = mkPretendard {
pname = "pretendard-std";
typeface = "PretendardStd";
sha256 = "sha256-FOlZrr6CHPfUm9Q+Yoi0HLQUI7cAhQYq6P6sJGXBIWg=";
};
}