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

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

59 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2023-01-25 12:34:24 +01:00
{ lib, stdenvNoCC, fetchzip }:
2022-05-22 06:27:04 +02:00
let
2023-11-06 07:38:37 +01:00
version = "1.3.9";
2022-05-22 06:27:04 +02:00
2023-01-25 12:34:24 +01:00
mkPretendard = { pname, typeface, hash }:
stdenvNoCC.mkDerivation {
inherit pname version;
2022-05-22 06:27:04 +02:00
2023-01-25 12:34:24 +01:00
src = fetchzip {
url = "https://github.com/orioncactus/pretendard/releases/download/v${version}/${typeface}-${version}.zip";
stripRoot = false;
inherit hash;
};
installPhase = ''
runHook preInstall
2022-05-22 06:27:04 +02:00
2023-01-25 12:34:24 +01:00
install -Dm644 public/static/*.otf -t $out/share/fonts/opentype
2022-07-01 16:32:54 +02:00
2023-01-25 12:34:24 +01:00
runHook postInstall
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";
2023-11-06 07:38:37 +01:00
hash = "sha256-n7RQApffpL/8ojHcZbdxyanl9Tlc8HP8kxLFBdArUfY=";
};
pretendard-gov = mkPretendard {
pname = "pretendard-gov";
typeface = "PretendardGOV";
2023-11-06 07:38:37 +01:00
hash = "sha256-qoDUBOmrk6WPKQgnapThfKC01xWup+HN82hcoIjEe0M=";
2022-05-22 06:27:04 +02:00
};
pretendard-jp = mkPretendard {
pname = "pretendard-jp";
typeface = "PretendardJP";
2023-11-06 07:38:37 +01:00
hash = "sha256-1nTk1LPoRSfSDgDuGWkcs6RRIY4ZOqDBPMsxezMos6Q=";
2022-05-22 06:27:04 +02:00
};
pretendard-std = mkPretendard {
pname = "pretendard-std";
typeface = "PretendardStd";
2023-11-06 07:38:37 +01:00
hash = "sha256-gkYqqxSICmSIrBuPRzBaOlGGM/rJU1z7FiFvu9RhK5s=";
2022-05-22 06:27:04 +02:00
};
}