Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 29 lines 915 B view raw
1{ lib 2, buildPythonPackage 3, numba 4, ndtypes 5, xnd 6, libndtypes 7, libxnd 8, libgumath 9, isPy27 10}: 11 12buildPythonPackage { 13 pname = "gumath"; 14 disabled = isPy27; 15 inherit (libgumath) src version meta; 16 17 checkInputs = [ numba ]; 18 propagatedBuildInputs = [ ndtypes xnd ]; 19 20 postPatch = '' 21 substituteInPlace setup.py \ 22 --replace 'add_include_dirs = [".", "libgumath", "ndtypes/python/ndtypes", "xnd/python/xnd"] + INCLUDES' \ 23 'add_include_dirs = [".", "${libndtypes}/include", "${libxnd}/include", "${libgumath}/include"]' \ 24 --replace 'add_library_dirs = ["libgumath", "ndtypes/libndtypes", "xnd/libxnd"] + LIBS' \ 25 'add_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]' \ 26 --replace 'add_runtime_library_dirs = ["$ORIGIN"]' \ 27 'add_runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]' 28 ''; 29}