2023-02-02 18:25:31 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl, p7zip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "sarasa-gothic";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "0.40.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
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${version}/sarasa-gothic-ttc-${version}.7z";
|
2023-03-24 00:07:29 +00:00
|
|
|
hash = "sha256-PVlozsWYomsQKp8WxHD8+pxzlTmIKGPK71HDLWMR9S0=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeBuildInputs = [ p7zip ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
mkdir -p $out/share/fonts/truetype
|
2023-02-02 18:25:31 +00:00
|
|
|
cp *.ttc $out/share/fonts/truetype
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "A CJK programming font based on Iosevka and Source Han Sans";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/be5invis/Sarasa-Gothic";
|
|
|
|
license = licenses.ofl;
|
|
|
|
maintainers = [ maintainers.ChengCat ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|