about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/xgboost/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/xgboost/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/xgboost/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/xgboost/default.nix b/nixpkgs/pkgs/development/python-modules/xgboost/default.nix
new file mode 100644
index 000000000000..d9b8fc892c16
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/xgboost/default.nix
@@ -0,0 +1,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
+  '';
+}