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

38 lines
673 B
Nix
Raw Normal View History

{ buildPythonPackage
2019-06-03 17:18:03 +02:00
, pytest
, nose
, scipy
2019-06-03 17:18:03 +02:00
, scikitlearn
, stdenv
, xgboost
, substituteAll
2019-06-03 17:18:03 +02:00
, pandas
, matplotlib
, graphviz
, datatable
}:
2019-08-13 23:52:01 +02:00
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 ];
2019-06-03 17:18:03 +02:00
checkInputs = [ nose pytest scikitlearn pandas matplotlib graphviz datatable ];
checkPhase = ''
ln -sf ../demo .
nosetests ../tests/python
'';
}