nixpkgs/pkgs/development/python-modules/xgboost/default.nix

37 lines
613 B
Nix
Raw Normal View History

{ stdenv
, buildPythonPackage
2019-06-03 16:18:03 +01:00
, pytest
, nose
, scipy
2019-06-03 16:18:03 +01:00
, scikitlearn
, xgboost
, substituteAll
2019-06-03 16:18:03 +01:00
, pandas
, matplotlib
, graphviz
, datatable
}:
buildPythonPackage rec {
pname = "xgboost";
inherit (xgboost) version src meta;
patches = [
(substituteAll {
src = ./lib-path-for-python.patch;
libpath = "${xgboost}/lib";
})
];
postPatch = "cd python-package";
propagatedBuildInputs = [ scipy ];
buildInputs = [ xgboost ];
2019-06-03 16:18:03 +01:00
checkInputs = [ nose pytest scikitlearn pandas matplotlib graphviz datatable ];
checkPhase = ''
ln -sf ../demo .
nosetests ../tests/python
'';
}