mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
42 lines
1,017 B
Nix
42 lines
1,017 B
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
unzip,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "sarasa-gothic";
|
|
version = "1.0.15";
|
|
|
|
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${finalAttrs.version}/Sarasa-TTC-${finalAttrs.version}.zip";
|
|
hash = "sha256-jN50v0N7wSL/F6qOSjp+nRmooR/mNiebsbe4Iy5YmeM=";
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/fonts/truetype
|
|
cp *.ttc $out/share/fonts/truetype
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "CJK programming font based on Iosevka and Source Han Sans";
|
|
homepage = "https://github.com/be5invis/Sarasa-Gothic";
|
|
license = lib.licenses.ofl;
|
|
maintainers = with lib.maintainers; [
|
|
ChengCat
|
|
wegank
|
|
];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|