nixpkgs/pkgs/by-name/sa/sarasa-gothic/package.nix
2024-04-14 02:29:22 +00:00

43 lines
1019 B
Nix

{
lib,
stdenvNoCC,
fetchurl,
unzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "sarasa-gothic";
version = "1.0.10";
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}/Sarasa-TTC-${finalAttrs.version}.zip";
hash = "sha256-P7A788hlyfb3bQsltMvGlbMn67643h6/ijEQP0yjIaU=";
};
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;
};
})