From 1223c8fd9d28f07c10fb20847a7bc04343d6ac55 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 27 Nov 2018 17:42:52 -0500 Subject: [PATCH] pythonPackages.gumath: init at unstable-2018-11-27 --- .../python-modules/gumath/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/gumath/default.nix 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"]' + ''; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 617a05287175..e6cb127f96db 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -418,6 +418,8 @@ in { guestfs = callPackage ../development/python-modules/guestfs { }; + gumath = callPackage ../development/python-modules/gumath { }; + h5py = callPackage ../development/python-modules/h5py { hdf5 = pkgs.hdf5; };