about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/gumath/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/gumath/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/gumath/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/gumath/default.nix b/nixpkgs/pkgs/development/python-modules/gumath/default.nix
new file mode 100644
index 000000000000..b066f323d682
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/gumath/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildPythonPackage
+, numba
+, ndtypes
+, xnd
+, libndtypes
+, libxnd
+, libgumath
+, isPy27
+}:
+
+buildPythonPackage {
+  pname = "gumath";
+  disabled = isPy27;
+  inherit (libgumath) src version meta;
+
+  checkInputs = [ numba ];
+  propagatedBuildInputs = [ ndtypes xnd ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace 'add_include_dirs = [".", "libgumath", "ndtypes/python/ndtypes", "xnd/python/xnd"] + INCLUDES' \
+                'add_include_dirs = [".", "${libndtypes}/include", "${libxnd}/include", "${libgumath}/include"]' \
+      --replace 'add_library_dirs = ["libgumath", "ndtypes/libndtypes", "xnd/libxnd"] + LIBS' \
+                'add_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]' \
+      --replace 'add_runtime_library_dirs = ["$ORIGIN"]' \
+                'add_runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]'
+  '';
+}