2018-03-15 01:17:55 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, nose
|
|
|
|
, scipy
|
|
|
|
, xgboost
|
2018-07-19 12:27:22 +01:00
|
|
|
, substituteAll
|
2018-03-15 01:17:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-06-23 14:27:58 +01:00
|
|
|
pname = "xgboost";
|
2018-03-15 01:17:55 +00:00
|
|
|
inherit (xgboost) version src meta;
|
|
|
|
|
2018-07-19 12:27:22 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./lib-path-for-python.patch;
|
|
|
|
libpath = "${xgboost}/lib";
|
|
|
|
})
|
|
|
|
];
|
2018-03-15 01:17:55 +00:00
|
|
|
|
2018-07-19 12:27:22 +01:00
|
|
|
postPatch = "cd python-package";
|
2018-03-15 01:17:55 +00:00
|
|
|
|
2018-07-19 12:27:22 +01:00
|
|
|
propagatedBuildInputs = [ scipy ];
|
|
|
|
buildInputs = [ xgboost ];
|
|
|
|
checkInputs = [ nose ];
|
2018-03-15 01:17:55 +00:00
|
|
|
|
2018-07-19 12:27:22 +01:00
|
|
|
checkPhase = ''
|
|
|
|
ln -sf ../demo .
|
|
|
|
nosetests ../tests/python
|
2018-03-15 01:17:55 +00:00
|
|
|
'';
|
|
|
|
}
|