14 inherit (libxnd) version src meta;
16 propagatedBuildInputs = [ ndtypes ];
19 substituteInPlace setup.py \
20 --replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \
21 'include_dirs = ["${libndtypes}/include", "${ndtypes}/include", "${libxnd}/include"]' \
22 --replace 'library_dirs = ["libxnd", "ndtypes/libndtypes"] + LIBS' \
23 'library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
24 --replace 'runtime_library_dirs = ["$ORIGIN"]' \
25 'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
30 cp python/xnd/*.h $out/include
31 '' + lib.optionalString stdenv.isDarwin ''
32 install_name_tool -add_rpath ${libxnd}/lib $out/${python.sitePackages}/xnd/_xnd.*.so