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