about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-11-27 17:42:32 -0500
committerChris Ostrouchov <chris.ostrouchov@gmail.com>2019-02-23 13:09:11 -0500
commitd9a5de3ccec70078b9f67870b4780691295f0342 (patch)
treea2a6d0f390e8ee2891561fdd185eddf369e00be4 /pkgs/development
parent8f0ef92ab2b076463f2e53678d5e172b5ea82a76 (diff)
downloadnixlib-d9a5de3ccec70078b9f67870b4780691295f0342.tar
nixlib-d9a5de3ccec70078b9f67870b4780691295f0342.tar.gz
nixlib-d9a5de3ccec70078b9f67870b4780691295f0342.tar.bz2
nixlib-d9a5de3ccec70078b9f67870b4780691295f0342.tar.lz
nixlib-d9a5de3ccec70078b9f67870b4780691295f0342.tar.xz
nixlib-d9a5de3ccec70078b9f67870b4780691295f0342.tar.zst
nixlib-d9a5de3ccec70078b9f67870b4780691295f0342.zip
pythonPackages.xnd: init at unstable-2018-11-27
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/xnd/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/xnd/default.nix b/pkgs/development/python-modules/xnd/default.nix
new file mode 100644
index 000000000000..8ffb8f96936b
--- /dev/null
+++ b/pkgs/development/python-modules/xnd/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, ndtypes
+, libndtypes
+, libxnd
+, isPy27
+}:
+
+buildPythonPackage {
+  pname = "xnd";
+  disabled = isPy27;
+  inherit (libxnd) version src meta;
+
+  propagatedBuildInputs = [ ndtypes ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \
+                'include_dirs = ["${libndtypes}/include", "${ndtypes}/include", "${libxnd}/include"]' \
+      --replace 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \
+                'library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
+      --replace 'runtime_library_dirs = ["$ORIGIN"]' \
+                'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
+  '';
+
+  postInstall = ''
+    mkdir $out/include
+    cp python/xnd/*.h $out/include
+  '';
+}