diff --git a/pkgs/development/python-modules/ndtypes/default.nix b/pkgs/development/python-modules/ndtypes/default.nix new file mode 100644 index 000000000000..2110f3628a80 --- /dev/null +++ b/pkgs/development/python-modules/ndtypes/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, libndtypes +, isPy27 +}: + +buildPythonPackage { + pname = "ndtypes"; + disabled = isPy27; + inherit (libndtypes) version src meta; + + propagatedBuildInputs = [ numpy ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'include_dirs = ["libndtypes"]' \ + 'include_dirs = ["${libndtypes}/include"]' \ + --replace 'library_dirs = ["libndtypes"]' \ + 'library_dirs = ["${libndtypes}/lib"]' \ + --replace 'runtime_library_dirs = ["$ORIGIN"]' \ + 'runtime_library_dirs = ["${libndtypes}/lib"]' + ''; + + postInstall = '' + mkdir $out/include + cp python/ndtypes/*.h $out/include + ''; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 810eb17e5e77..8823d7986f6a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -496,6 +496,8 @@ in { nbval = callPackage ../development/python-modules/nbval { }; + ndtypes = callPackage ../development/python-modules/ndtypes { }; + nest-asyncio = callPackage ../development/python-modules/nest-asyncio { }; neuron = pkgs.neuron.override {