Merge pull request #250803 from h7x4/init-ark-pixel-font

ark-pixel-font: init at 2023.08.15
This commit is contained in:
Peder Bergebakken Sundt 2023-12-06 23:34:31 +01:00 committed by GitHub
commit e407f06e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 249 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{ lib
, python3Packages
, fetchFromGitHub
, nix-update-script
, ...
}:
python3Packages.buildPythonPackage rec {
pname = "ark-pixel-font";
version = "2023.08.15";
src = fetchFromGitHub {
owner = "TakWolf";
repo = pname;
rev = version;
hash = "sha256-Qaa3uuMCPrRG0wo2AGU0v+fonY1c/KuQYTGoyvITcio=";
};
format = "other";
nativeBuildInputs = with python3Packages; [
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;
};
}

View File

@ -0,0 +1,42 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, nix-update-script
, hatch-vcs
, hatchling
, brotli
, fonttools
}:
buildPythonPackage rec {
pname = "bdffont";
version = "0.0.15";
disabled = pythonOlder "3.11";
src = fetchPypi {
inherit pname version;
hash = "sha256-aXK6zqLFfqLXa/JLmSSW3gtC2+wtutz3/lLdYPZZ/ys=";
};
format = "pyproject";
nativeBuildInputs = [
hatch-vcs
hatchling
];
nativeCheckInputs = [ pytestCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/TakWolf/bdffont";
description = "A library for manipulating .bdf format fonts";
platforms = lib.platforms.all;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ h7x4 ];
};
}

View File

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, nix-update-script
, hatch-vcs
, hatchling
}:
buildPythonPackage rec {
pname = "character-encoding-utils";
version = "0.0.6";
disabled = pythonOlder "3.11";
src = fetchPypi {
pname = "character_encoding_utils";
inherit version;
hash = "sha256-ugzWiSpa/xxlraVyVPTSq/uxPg11kOyePgb1cmzX3ug=";
};
format = "pyproject";
nativeBuildInputs = [
hatch-vcs
hatchling
];
checkInputs = [ pytestCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/TakWolf/character-encoding-utils";
description = "Some character encoding utils";
platforms = lib.platforms.all;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ h7x4 ];
};
}

View File

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, nix-update-script
, hatch-vcs
, hatchling
, bdffont
, brotli
, fonttools
, pypng
}:
buildPythonPackage rec {
pname = "pixel-font-builder";
version = "0.0.10";
disabled = pythonOlder "3.11";
src = fetchPypi {
pname = "pixel_font_builder";
inherit version;
hash = "sha256-evLsNRSC9sPZfhNc8tYbZ/bIrBxSbLuiGRD3ld7Jkbo=";
};
format = "pyproject";
nativeBuildInputs = [
hatch-vcs
hatchling
];
nativeCheckInputs = [
pytestCheckHook
pypng
];
propagatedBuildInputs = [
bdffont
brotli
fonttools
];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/TakWolf/pixel-font-builder";
description = "A library that helps create pixel style fonts";
platforms = lib.platforms.all;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ h7x4 ];
};
}

View File

@ -0,0 +1,44 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, nix-update-script
, hatch-vcs
, hatchling
, langcodes
}:
buildPythonPackage rec {
pname = "unidata-blocks";
version = "0.0.8";
disabled = pythonOlder "3.11";
src = fetchPypi {
pname = "unidata_blocks";
inherit version;
hash = "sha256-Y7OSFuPHgzNc/KtmBWwdVqH7Xy4v4w2UGHBUF9pIuSU=";
};
format = "pyproject";
nativeBuildInputs = [
hatch-vcs
hatchling
];
propagatedBuildInputs = [ langcodes ];
nativeCheckInputs = [ pytestCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/TakWolf/unidata-blocks";
description = "A library that helps query unicode blocks by Blocks.txt";
platforms = lib.platforms.all;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ h7x4 ];
};
}

View File

@ -1378,6 +1378,8 @@ self: super: with self; {
else
callPackage ../development/python-modules/bcrypt { };
bdffont = callPackage ../development/python-modules/bdffont { };
beaker = callPackage ../development/python-modules/beaker { };
before-after = callPackage ../development/python-modules/before-after { };
@ -1962,6 +1964,8 @@ self: super: with self; {
characteristic = callPackage ../development/python-modules/characteristic { };
character-encoding-utils = callPackage ../development/python-modules/character-encoding-utils { };
chardet = callPackage ../development/python-modules/chardet { };
charset-normalizer = callPackage ../development/python-modules/charset-normalizer { };
@ -9241,6 +9245,8 @@ self: super: with self; {
pixelmatch = callPackage ../development/python-modules/pixelmatch { };
pixel-font-builder = callPackage ../development/python-modules/pixel-font-builder { };
pixel-ring = callPackage ../development/python-modules/pixel-ring { };
pjsua2 = (toPythonModule (pkgs.pjsip.override {
@ -15419,6 +15425,8 @@ self: super: with self; {
unicrypto = callPackage ../development/python-modules/unicrypto { };
unidata-blocks = callPackage ../development/python-modules/unidata-blocks { };
unidecode = callPackage ../development/python-modules/unidecode { };
unidic = callPackage ../development/python-modules/unidic { };