15 nameValuePair (lib.strings.toLower name) (fetchurl {
16 url = "https://github.com/GuiWonder/Shanggu/releases/download/${version}/Shanggu${name}TTCs.7z";
21 Mono = "sha256-3WwknXSMH12Lu/HA/f647AyhDg2O9Eg5ZGDBrFp4SbE=";
22 Round = "sha256-vRL2YQkcp5vDSbLaMDEYd7HJVohZFYKlBfxAdY2l3mA=";
23 Sans = "sha256-x5z6GYsfQ+8a8W0djJTY8iutuLNYvaemIpdYh94krk0=";
24 Serif = "sha256-3WK7vty3zZFNKkwViEsozU3qa+5hymYwXk6ta9AxmNM=";
27 extraOutputs = builtins.attrNames source;
29 stdenvNoCC.mkDerivation {
30 pname = "shanggu-fonts";
33 outputs = [ "out" ] ++ extraOutputs;
35 nativeBuildInputs = [ p7zip ];
41 + lib.strings.concatLines (
42 lib.attrsets.mapAttrsToList (name: value: ''
43 7z x ${value} -o${name}
54 mkdir -p $out/share/fonts/truetype
56 + lib.strings.concatLines (
57 lib.lists.forEach extraOutputs (name: ''
58 install -Dm444 ${name}/*.ttc -t ${placeholder name}/share/fonts/truetype
59 ln -s "${placeholder name}" /share/fonts/truetype/*.ttc $out/share/fonts/truetype
67 homepage = "https://github.com/GuiWonder/Shanggu";
68 description = "Heritage glyph (old glyph) font based on Siyuan";
69 license = licenses.ofl;
70 platforms = platforms.all;
71 maintainers = with maintainers; [ Cryolitia ];