about summary refs log tree commit diff
path: root/pkgs/development/python-modules/horizon-eda/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/horizon-eda/default.nix')
-rw-r--r--pkgs/development/python-modules/horizon-eda/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/horizon-eda/default.nix b/pkgs/development/python-modules/horizon-eda/default.nix
new file mode 100644
index 0000000000000..d2385e190e774
--- /dev/null
+++ b/pkgs/development/python-modules/horizon-eda/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, callPackage
+, horizon-eda
+, mesa
+, pycairo
+, python
+, pythonOlder
+}:
+
+let
+  base = horizon-eda.passthru.base;
+in
+buildPythonPackage {
+  inherit (base) pname version src meta CASROOT;
+
+  pyproject = false;
+
+  disabled = pythonOlder "3.9";
+
+  buildInputs = base.buildInputs ++ [
+    mesa
+    mesa.osmesa
+    python
+  ];
+
+  propagatedBuildInputs = [
+    pycairo
+  ];
+
+  nativeBuildInputs = base.nativeBuildInputs;
+
+  buildFlags = ["pymodule"];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/${python.sitePackages}
+    cp build/horizon.so $out/${python.sitePackages}
+
+    runHook postInstall
+  '';
+
+  enableParallelBuilding = true;
+}