2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
2024-04-21 15:54:59 +00:00
|
|
|
, python312Packages
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
python312Packages.buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "ark-pixel-font";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2024.05.12";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TakWolf";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "ark-pixel-font";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-PGhhKWHDpvOqa3vaI40wuIsAEdWGb62cN7QJeHQqiss=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = with python312Packages; [
|
2024-01-02 11:29:13 +00:00
|
|
|
pixel-font-builder
|
|
|
|
unidata-blocks
|
|
|
|
character-encoding-utils
|
|
|
|
pypng
|
|
|
|
pillow
|
|
|
|
beautifulsoup4
|
|
|
|
jinja2
|
|
|
|
gitpython
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
python build.py
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm444 build/outputs/*.bdf -t $out/share/fonts/bdf
|
|
|
|
install -Dm444 build/outputs/*.otf -t $out/share/fonts/opentype
|
|
|
|
install -Dm444 build/outputs/*.ttf -t $out/share/fonts/truetype
|
|
|
|
install -Dm444 build/outputs/*.woff2 -t $out/share/fonts/woff2
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open source pan-CJK pixel font";
|
|
|
|
homepage = "https://ark-pixel-font.takwolf.com/";
|
|
|
|
license = lib.licenses.ofl;
|
|
|
|
maintainers = with lib.maintainers; [ h7x4 ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|