1{ stdenv 2, buildPythonPackage 3, nose 4, scipy 5, xgboost 6, substituteAll 7}: 8 9buildPythonPackage rec { 10 pname = "xgboost"; 11 inherit (xgboost) version src meta; 12 13 patches = [ 14 (substituteAll { 15 src = ./lib-path-for-python.patch; 16 libpath = "${xgboost}/lib"; 17 }) 18 ]; 19 20 postPatch = "cd python-package"; 21 22 propagatedBuildInputs = [ scipy ]; 23 buildInputs = [ xgboost ]; 24 checkInputs = [ nose ]; 25 26 checkPhase = '' 27 ln -sf ../demo . 28 nosetests ../tests/python 29 ''; 30}