about summary refs log tree commit diff
path: root/pkgs/by-name/fi
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2024-01-19 04:40:24 +0100
committerGitHub <noreply@github.com>2024-01-19 04:40:24 +0100
commit4471857c0a4a8a0ffc7bdbeaf1b998746ce12a82 (patch)
tree78b9180a7cbd059d2c9b4b8b8e6a7c868687f32e /pkgs/by-name/fi
parentebf6ec7844fded8131afed074df18bb5f6379ba8 (diff)
parentc7b66c7165a627b2c6e82fe6664f34bf0583eff0 (diff)
Merge pull request #278225 from loicreynier/fira-math-init-at-0.3.4
fira-math: init at 0.3.4
Diffstat (limited to 'pkgs/by-name/fi')
-rw-r--r--pkgs/by-name/fi/fira-math/package.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/by-name/fi/fira-math/package.nix b/pkgs/by-name/fi/fira-math/package.nix
new file mode 100644
index 0000000000000..56bcb916d2d40
--- /dev/null
+++ b/pkgs/by-name/fi/fira-math/package.nix
@@ -0,0 +1,49 @@
+{ lib, fetchFromGitHub, fira-math, python3, stdenvNoCC }:
+
+let
+  pname = "fira-math";
+  date = "2023-10-09";
+  version = "0.3.4-unstable-${date}";
+in stdenvNoCC.mkDerivation {
+  inherit pname version;
+
+  src = fetchFromGitHub {
+    owner = "firamath";
+    repo = "firamath";
+    rev = "4bd85bc943eb6a194cfc090f7e194aa27d8f8419";
+    hash = "sha256-1skakzdvzf7nX2un7b9aCSj1pzBAQuueZEU7B1nARa4=";
+  };
+
+  nativeBuildInputs = [
+    (python3.withPackages (ps: with ps; [
+      fontmake
+      fonttools
+      glyphslib
+      toml
+    ]))
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    python scripts/build.py
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D "build/"*.otf -t "$out/share/fonts/opentype/"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Math font with Unicode math support based on FiraSans and FiraGO";
+    homepage = "https://github.com/firamath/firamath";
+    license = licenses.ofl;
+    maintainers = [ maintainers.loicreynier ];
+    platforms = platforms.all;
+  };
+}