2020-05-13 05:24:14 +00:00
|
|
|
{ lib, fetchurl, libarchive }:
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2018-11-23 23:07:45 +00:00
|
|
|
let
|
2022-02-11 15:37:28 +00:00
|
|
|
version = "0.35.8";
|
2019-08-13 21:52:01 +00:00
|
|
|
in fetchurl {
|
2018-11-23 23:07:45 +00:00
|
|
|
name = "sarasa-gothic-${version}";
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2021-11-06 06:29:40 +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.)
|
|
|
|
url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/sarasa-gothic-ttc-${version}.7z";
|
2022-02-11 15:37:28 +00:00
|
|
|
sha256 = "sha256-22q+FdTh9Dex+tEo/HCBK14ZlJFtFM7SrE6K1/iVBY0=";
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2018-11-23 23:07:45 +00:00
|
|
|
recursiveHash = true;
|
|
|
|
downloadToTemp = true;
|
2018-04-25 09:34:53 +00:00
|
|
|
|
2018-11-23 23:07:45 +00:00
|
|
|
postFetch = ''
|
2021-10-30 04:20:00 +00:00
|
|
|
mkdir -p $out/share/fonts/truetype
|
|
|
|
${libarchive}/bin/bsdtar -xf $downloadedFile -C $out/share/fonts/truetype
|
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;
|
|
|
|
};
|
|
|
|
}
|