about summary refs log tree commit diff
path: root/pkgs/by-name/ar
diff options
context:
space:
mode:
authorh7x4 <h7x4@nani.wtf>2023-08-22 20:02:59 +0200
committerh7x4 <h7x4@nani.wtf>2023-11-17 00:46:58 +0100
commita0520c4483c6b9bd3d115fd05500c9d0e2b977ec (patch)
tree589eb5ccfee7faab181670ec94809910f582b671 /pkgs/by-name/ar
parentca98c93050b20d92248cb49efebeee54420b39da (diff)
ark-pixel-font: init at 2023.08.15
Diffstat (limited to 'pkgs/by-name/ar')
-rw-r--r--pkgs/by-name/ar/ark-pixel-font/package.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/by-name/ar/ark-pixel-font/package.nix b/pkgs/by-name/ar/ark-pixel-font/package.nix
new file mode 100644
index 0000000000000..f5ffd4f9b2c6e
--- /dev/null
+++ b/pkgs/by-name/ar/ark-pixel-font/package.nix
@@ -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;
+  };
+}