about summary refs log tree commit diff
path: root/pkgs/development/python-modules/statmake/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/statmake/default.nix')
-rw-r--r--pkgs/development/python-modules/statmake/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/statmake/default.nix b/pkgs/development/python-modules/statmake/default.nix
new file mode 100644
index 0000000000000..7de42d5bc9454
--- /dev/null
+++ b/pkgs/development/python-modules/statmake/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, poetry-core
+, attrs
+, cattrs
+, fonttools
+, fs
+, pytestCheckHook
+, ufo2ft
+, ufoLib2
+}:
+
+buildPythonPackage rec {
+  pname = "statmake";
+  version = "0.4.1";
+
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "daltonmaag";
+    repo = "statmake";
+    rev = "v${version}";
+    sha256 = "OXhoQAD4LEh80iRUZE2z8sCtWJDv/bSo0bwHbOOPVE0=";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    attrs
+    cattrs
+    fonttools
+    # required by fonttools[ufo]
+    fs
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    ufo2ft
+    ufoLib2
+  ];
+
+  postPatch = ''
+    # https://github.com/daltonmaag/statmake/pull/41
+    substituteInPlace pyproject.toml \
+      --replace 'requires = ["poetry>=1.0.0"]' 'requires = ["poetry-core"]' \
+      --replace 'build-backend = "poetry.masonry.api"' 'build-backend = "poetry.core.masonry.api"'
+  '';
+
+  meta = with lib; {
+    description = "Applies STAT information from a Stylespace to a variable font";
+    homepage = "https://github.com/daltonmaag/statmake";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jtojnar ];
+  };
+}