nixpkgs/pkgs/data/fonts/pretendard/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Normal View History

2022-05-22 06:27:04 +02:00
{ lib, fetchzip }:
let
2022-07-01 16:32:54 +02:00
version = "1.3.3";
2022-05-22 06:27:04 +02:00
mkPretendard = { pname, typeface, sha256 }:
fetchzip {
name = "${pname}-${version}";
url = "https://github.com/orioncactus/pretendard/releases/download/v${version}/${typeface}-${version}.zip";
inherit sha256;
2022-07-01 16:32:54 +02:00
stripRoot = false;
2022-05-22 06:27:04 +02:00
postFetch = ''
2022-07-01 16:32:54 +02:00
mkdir -p $out/share/fonts/
install -Dm644 $out/public/static/*.otf -t $out/share/fonts/opentype
rm -rf $out/{public,web,LICENSE.txt}
2022-05-22 06:27:04 +02:00
'';
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";
2022-07-01 16:32:54 +02:00
sha256 = "sha256-lRHRdCAg3i3+3Y6j0dCXUgwLdeS/VeI6KNkbDKchNEY=";
2022-05-22 06:27:04 +02:00
};
pretendard-jp = mkPretendard {
pname = "pretendard-jp";
typeface = "PretendardJP";
2022-07-01 16:32:54 +02:00
sha256 = "sha256-VgGt/WoaaJJDAzw+gUQVgTQ+q34bdAaKUB4cA9eU0dQ=";
2022-05-22 06:27:04 +02:00
};
pretendard-std = mkPretendard {
pname = "pretendard-std";
typeface = "PretendardStd";
2022-07-01 16:32:54 +02:00
sha256 = "sha256-FOlZrr6CHPfUm9Q+Yoi0HLQUI7cAhQYq6P6sJGXBIWg=";
2022-05-22 06:27:04 +02:00
};
}