summary refs log tree commit diff
path: root/pkgs/development/python-modules/xgboost/default.nix
blob: d9b8fc892c16555ce1fccfdc845d77bca8471e0d (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
{ stdenv
, buildPythonPackage
, nose
, scipy
, xgboost
, substituteAll
}:

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 ];

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