main
1{
2 lib,
3 stdenvNoCC,
4 fetchzip,
5 installFonts,
6 nix-update-script,
7}: let
8 version = "1.004";
9in
10 stdenvNoCC.mkDerivation {
11 pname = "lxgw-marker-gothic";
12 inherit version;
13
14 src = fetchzip {
15 url = "https://github.com/lxgw/LxgwMarkerGothic/releases/download/v${version}/LxgwMarkerGothic-v${version}.zip";
16 hash = "sha256-4tQ7P6r9YvyZa7SOTGr+CQs3mXN4PILgkm8N4gVUwYo=";
17 };
18
19 nativeBuildInputs = [installFonts];
20
21 # fonts/gf is a Google Fonts-styled duplicate that collides with fonts/ttf in installFonts
22 preInstall = "rm -r fonts/gf";
23
24 passthru.updateScript = nix-update-script {};
25
26 preferLocalBuild = true;
27
28 meta = {
29 homepage = "https://github.com/lxgw/LxgwMarkerGothic";
30 description = "Open-source Chinese font derived from Tanugo";
31 license = lib.licenses.ofl;
32 platforms = lib.platforms.all;
33 };
34 }