nixpkgs/pkgs/data/fonts/sarasa-gothic/default.nix

29 lines
897 B
Nix
Raw Normal View History

{ lib, fetchurl, libarchive }:
2018-04-25 11:34:53 +02:00
let
2021-10-30 06:20:00 +02:00
version = "0.34.7";
2019-08-13 23:52:01 +02:00
in fetchurl {
name = "sarasa-gothic-${version}";
2018-04-25 11:34:53 +02: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";
sha256 = "0fzbqj32jiffqsr4s0i8fignk01v5d1rik6ldg2q7dgl1298sgk8";
2018-04-25 11:34:53 +02:00
recursiveHash = true;
downloadToTemp = true;
2018-04-25 11:34:53 +02:00
postFetch = ''
2021-10-30 06:20:00 +02:00
mkdir -p $out/share/fonts/truetype
${libarchive}/bin/bsdtar -xf $downloadedFile -C $out/share/fonts/truetype
2018-04-25 11:34:53 +02:00
'';
meta = with lib; {
2021-10-30 06:20:00 +02:00
description = "A CJK programming font based on Iosevka and Source Han Sans";
homepage = "https://github.com/be5invis/Sarasa-Gothic";
2018-04-25 11:34:53 +02:00
license = licenses.ofl;
maintainers = [ maintainers.ChengCat ];
platforms = platforms.all;
};
}