Skip to content

Commit

Permalink
feat: initial alibaba-puhuiti
Browse files Browse the repository at this point in the history
Signed-off-by: Burgess Chang <[email protected]>
  • Loading branch information
brsvh committed Aug 14, 2024
1 parent 8dc895d commit 3326958
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/src/fonts/overlays/proprius-fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ Return a list of font derivation from a given list of font derivations that grat

## Packages

### `pkgs.alibaba-puhuiti`

An Chinese font gratis propria commercium, design by Alibaba.

### `pkgs.foundertype-fonts`

This is a part of the foudertype fonts, only includes the fonts required by the CTeX `founder` fontset. You need to obtain the authorization to use the font at <https://www.foundertype.com> before installation, and strictly comply with the FounderType Home Edition User License Agreement [^1].
Expand Down
42 changes: 42 additions & 0 deletions nix/fonts/overlays/alibaba-puhuiti/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
fetchzip,
lib,
stdenvNoCC,
}:
let
alibaba-puhuiti-license = {
free = false;
fullName = "《阿里巴巴普惠体3.0版》法律声明";
redistributable = true;
shortName = "alibaba-puhuiti-license";
url = "https://www.yuque.com/yiguang-wkqc2/puhuiti/nus9wiinq4aeiegy";
};
in
stdenvNoCC.mkDerivation {
pname = "alibaba-puhuiti";
version = "3.0";

src = fetchzip {
hash = "sha256-7ZmurN+sC3binkhABG588Tdvz7KLc06+UvK5TOTjqvY=";
stripRoot = false;
url = "https://puhuiti.oss-cn-hangzhou.aliyuncs.com/AlibabaPuHuiTi-3.zip";
};

installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp -r $src/AlibabaPuHuiTi-3 $out/share/fonts/truetype/
runHook postInstall
'';

meta = with lib; {
homepage = "https://www.alibabafonts.com";
description = "An Chinese font gratis propria commercium";
license = alibaba-puhuiti-license;
platforms = platforms.all;
maintainers = with maintainers; [ brsvh ];
};
}
2 changes: 2 additions & 0 deletions nix/fonts/overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
inherit (prev) callPackage;
in
{
alibaba-puhuiti = callPackage ./alibaba-puhuiti/package.nix { };

foundertype-fonts = callPackage ./foundertype-fonts/package.nix { };

tsangertypeFonts = callPackage ./tsangertype-fonts/package.nix { };
Expand Down
2 changes: 2 additions & 0 deletions nix/fonts/packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ let
pkgs = nixpkgs.appendOverlays [ cell.overlays.proprius-fonts ];
in
{
alibaba-puhuiti = pkgs.alibaba-puhuiti;

foundertype-fonts = pkgs.foundertype-fonts;

tsangertype-fonts = pkgs.tsangertypeFonts.gratisProPersona;
Expand Down

0 comments on commit 3326958

Please sign in to comment.