2019-06-16 20:59:06 +01:00
|
|
|
{ buildPythonPackage
|
2019-06-03 16:18:03 +01:00
|
|
|
, pytest
|
2018-03-15 01:17:55 +00:00
|
|
|
, nose
|
|
|
|
, scipy
|
2019-06-03 16:18:03 +01:00
|
|
|
, scikitlearn
|
2018-03-15 01:17:55 +00:00
|
|
|
, xgboost
|
2018-07-19 12:27:22 +01:00
|
|
|
, substituteAll
|
2019-06-03 16:18:03 +01:00
|
|
|
, pandas
|
|
|
|
, matplotlib
|
|
|
|
, graphviz
|
|
|
|
, datatable
|
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 ];
|
2019-06-03 16:18:03 +01:00
|
|
|
checkInputs = [ nose pytest scikitlearn pandas matplotlib graphviz datatable ];
|
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
|
|
|
'';
|
|
|
|
}
|