diff options
author | Chris Ostrouchov | 2018-11-27 17:42:32 -0500 |
---|---|---|
committer | Chris Ostrouchov | 2019-02-23 13:09:11 -0500 |
commit | d9a5de3ccec70078b9f67870b4780691295f0342 (patch) | |
tree | a2a6d0f390e8ee2891561fdd185eddf369e00be4 /pkgs/development | |
parent | 8f0ef92ab2b076463f2e53678d5e172b5ea82a76 (diff) |
pythonPackages.xnd: init at unstable-2018-11-27
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/xnd/default.nix | 31 |
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 + ''; +} |