2019-06-16 21:59:06 +02:00
|
|
|
{ buildPythonPackage
|
2019-06-03 17:18:03 +02:00
|
|
|
, pytest
|
2018-03-15 02:17:55 +01:00
|
|
|
, nose
|
|
|
|
, scipy
|
2019-06-03 17:18:03 +02:00
|
|
|
, scikitlearn
|
2019-08-01 03:29:11 +02:00
|
|
|
, stdenv
|
2018-03-15 02:17:55 +01:00
|
|
|
, xgboost
|
2018-07-19 13:27:22 +02:00
|
|
|
, substituteAll
|
2019-06-03 17:18:03 +02:00
|
|
|
, pandas
|
|
|
|
, matplotlib
|
|
|
|
, graphviz
|
|
|
|
, datatable
|
2018-03-15 02:17:55 +01:00
|
|
|
}:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
buildPythonPackage {
|
2018-06-23 15:27:58 +02:00
|
|
|
pname = "xgboost";
|
2018-03-15 02:17:55 +01:00
|
|
|
inherit (xgboost) version src meta;
|
|
|
|
|
2018-07-19 13:27:22 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./lib-path-for-python.patch;
|
|
|
|
libpath = "${xgboost}/lib";
|
2019-08-01 03:29:11 +02:00
|
|
|
extention = stdenv.hostPlatform.extensions.sharedLibrary;
|
2018-07-19 13:27:22 +02:00
|
|
|
})
|
|
|
|
];
|
2018-03-15 02:17:55 +01:00
|
|
|
|
2018-07-19 13:27:22 +02:00
|
|
|
postPatch = "cd python-package";
|
2018-03-15 02:17:55 +01:00
|
|
|
|
2018-07-19 13:27:22 +02:00
|
|
|
propagatedBuildInputs = [ scipy ];
|
|
|
|
buildInputs = [ xgboost ];
|
2019-06-03 17:18:03 +02:00
|
|
|
checkInputs = [ nose pytest scikitlearn pandas matplotlib graphviz datatable ];
|
2018-03-15 02:17:55 +01:00
|
|
|
|
2018-07-19 13:27:22 +02:00
|
|
|
checkPhase = ''
|
|
|
|
ln -sf ../demo .
|
|
|
|
nosetests ../tests/python
|
2018-03-15 02:17:55 +01:00
|
|
|
'';
|
|
|
|
}
|