2020-05-15 21:57:56 +00:00
|
|
|
{ lib, fetchurl, libarchive }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.36.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
in fetchurl {
|
|
|
|
name = "sarasa-gothic-${version}";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Use the 'ttc' files here for a smaller closure size.
|
|
|
|
# (Using 'ttf' files gives a closure size about 15x larger, as of November 2021.)
|
2020-04-24 23:36:52 +00:00
|
|
|
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-hUQi8mbtQC+peslaz+AVINjELVXseuVi44qbDBtJ+fc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
recursiveHash = true;
|
|
|
|
downloadToTemp = true;
|
|
|
|
|
|
|
|
postFetch = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
mkdir -p $out/share/fonts/truetype
|
|
|
|
${libarchive}/bin/bsdtar -xf $downloadedFile -C $out/share/fonts/truetype
|
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;
|
|
|
|
};
|
|
|
|
}
|