diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-03-13 14:38:59 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-03-13 14:38:59 +0100 |
commit | 9b4c9079b57c9979fa14c1b818f3dc39a91edf3d (patch) | |
tree | 4b2c6fae199bc3c42e8149d950da7768af91182b /pkgs/by-name/sa | |
parent | 3452f773bbc5a143439cd5229655b4329235df08 (diff) |
sarasa-gothic: 1.0.5 -> 1.0.6, refactor
Diffstat (limited to 'pkgs/by-name/sa')
-rw-r--r-- | pkgs/by-name/sa/sarasa-gothic/package.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/by-name/sa/sarasa-gothic/package.nix b/pkgs/by-name/sa/sarasa-gothic/package.nix new file mode 100644 index 0000000000000..3d91b7ee0f475 --- /dev/null +++ b/pkgs/by-name/sa/sarasa-gothic/package.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenvNoCC, + fetchurl, + unzip, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "sarasa-gothic"; + version = "1.0.6"; + + src = fetchurl { + # Use the 'ttc' files here for a smaller closure size. + # (Using 'ttf' files gives a closure size about 15x larger, as of November 2021.) + url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${finalAttrs.version}b/Sarasa-TTC-${finalAttrs.version}.zip"; + hash = "sha256-MkbmEn4vV2WEDC8pW+WewPuVhlLPi2iGmhvJW6Szksw="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/fonts/truetype + cp *.ttc $out/share/fonts/truetype + + runHook postInstall + ''; + + meta = { + description = "A CJK programming font based on Iosevka and Source Han Sans"; + homepage = "https://github.com/be5invis/Sarasa-Gothic"; + license = lib.licenses.ofl; + maintainers = with lib.maintainers; [ + ChengCat + wegank + ]; + platforms = lib.platforms.all; + }; +}) |