depot/third_party/nixpkgs/pkgs/development/python-modules/xgboost/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

37 lines
673 B
Nix

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