2023-01-30 12:22:54 +00:00
|
|
|
{ lib, stdenvNoCC, fetchurl, p7zip }:
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2023-01-30 12:22:54 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "sarasa-gothic";
|
2023-04-25 03:01:01 +00:00
|
|
|
version = "0.40.6";
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2023-01-30 12:22:54 +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-04-25 03:01:01 +00:00
|
|
|
hash = "sha256-AHslDiYBQXcxo8XVh1GMZDR8LJXvzJHl4hrisfhltEM=";
|
2023-01-30 12:22:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2023-01-30 12:22:54 +00:00
|
|
|
nativeBuildInputs = [ p7zip ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2021-10-30 04:20:00 +00:00
|
|
|
mkdir -p $out/share/fonts/truetype
|
2023-01-30 12:22:54 +00:00
|
|
|
cp *.ttc $out/share/fonts/truetype
|
|
|
|
|
|
|
|
runHook postInstall
|
2018-04-25 09:34:53 +00:00
|
|
|
'';
|
|
|
|
|
2019-05-13 01:55:32 +00:00
|
|
|
meta = with lib; {
|
2021-10-30 04:20:00 +00:00
|
|
|
description = "A CJK programming font based on Iosevka and Source Han Sans";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/be5invis/Sarasa-Gothic";
|
2018-04-25 09:34:53 +00:00
|
|
|
license = licenses.ofl;
|
|
|
|
maintainers = [ maintainers.ChengCat ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|