about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/xgboost/default.nix
blob: bbe7c9862606a920c08e1e979e0185f2fa85b6fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ buildPythonPackage
, pytest
, nose
, scipy
, scikitlearn
, xgboost
, substituteAll
, 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 ];
  checkInputs = [ nose pytest scikitlearn pandas matplotlib graphviz datatable ];

  checkPhase = ''
    ln -sf ../demo .
    nosetests ../tests/python
  '';
}