about summary refs log tree commit diff
path: root/pkgs/development/python-modules/py-slvs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/py-slvs/default.nix')
-rw-r--r--pkgs/development/python-modules/py-slvs/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/py-slvs/default.nix b/pkgs/development/python-modules/py-slvs/default.nix
new file mode 100644
index 000000000000..1f434fe66970
--- /dev/null
+++ b/pkgs/development/python-modules/py-slvs/default.nix
@@ -0,0 +1,50 @@
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  swig,
+  cmake,
+  ninja,
+  setuptools,
+  scikit-build,
+}:
+
+buildPythonPackage rec {
+  pname = "py-slvs";
+  version = "1.0.6";
+
+  src = fetchPypi {
+    pname = "py_slvs";
+    inherit version;
+    hash = "sha256-U6T/aXy0JTC1ptL5oBmch0ytSPmIkRA8XOi31NpArnI=";
+  };
+
+  pyproject = true;
+
+  nativeBuildInputs = [
+    swig
+  ];
+
+  build-system = [
+    cmake
+    ninja
+    setuptools
+    scikit-build
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  pythonImportsCheck = [
+    "py_slvs"
+  ];
+
+  meta = {
+    description = "Python binding of SOLVESPACE geometry constraint solver";
+    homepage = "https://github.com/realthunder/slvs_py";
+    license = lib.licenses.gpl3Only;
+    maintainers = with lib.maintainers; [
+      traverseda
+    ];
+  };
+}
+