about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorChris Ostrouchov2018-11-27 17:42:52 -0500
committerChris Ostrouchov2019-02-23 13:09:11 -0500
commit1223c8fd9d28f07c10fb20847a7bc04343d6ac55 (patch)
tree6d60a3e085213e70e777151853a9133e57612531 /pkgs/development
parentd9a5de3ccec70078b9f67870b4780691295f0342 (diff)
pythonPackages.gumath: init at unstable-2018-11-27
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/gumath/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/gumath/default.nix b/pkgs/development/python-modules/gumath/default.nix
new file mode 100644
index 000000000000..b066f323d682
--- /dev/null
+++ b/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"]'
+  '';
+}