2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchurl,
|
|
|
|
unzip,
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
2023-02-02 18:25:31 +00:00
|
|
|
pname = "sarasa-gothic";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.0.13";
|
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.)
|
2024-04-21 15:54:59 +00:00
|
|
|
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${finalAttrs.version}/Sarasa-TTC-${finalAttrs.version}.zip";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-dsYYzE5NrJgFCzV8fp6eUD+8bDf6qDP8/tBNRKhnytY=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
meta = {
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.ofl;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
ChengCat
|
|
|
|
wegank
|
|
|
|
];
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
})
|