diff options
author | Nikolay Amiantov <ab@fmap.me> | 2018-03-05 04:55:24 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2018-03-05 04:55:26 +0300 |
commit | eaed0ec08eb11de3fc4c560066d665dde380e742 (patch) | |
tree | c8cea1003eacc06c8dcf202223ec96fbc039114b /pkgs/development/libraries/xgboost | |
parent | f03c5eb88a4f180b05d34ba18a3b2d58e71c7383 (diff) |
xgboost: 0.60 -> 0.7
Fixes build error.
Diffstat (limited to 'pkgs/development/libraries/xgboost')
-rw-r--r-- | pkgs/development/libraries/xgboost/default.nix | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index e37991367e6f..6f296bb40b90 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -1,23 +1,37 @@ -{ stdenv, fetchgit }: +{ stdenv, lib, fetchgit, cmake +, avxSupport ? false +, cudaSupport ? false, cudatoolkit +, ncclSupport ? false, nccl +}: + +assert ncclSupport -> cudaSupport; stdenv.mkDerivation rec { name = "xgboost-${version}"; - version = "0.60"; + version = "0.7"; # needs submodules src = fetchgit { url = "https://github.com/dmlc/xgboost"; rev = "refs/tags/v${version}"; - sha256 = "0536vfl59n9vlagl1cpdl06c9y19dscwhwdzvi27zk5nc5qb6rdq"; + sha256 = "1wxh020l4q037hc5z7vgxflb70l41a97anl8g6y4wxb74l5zv61l"; }; enableParallelBuilding = true; + nativeBuildInputs = [ cmake ]; + + buildInputs = lib.optional cudaSupport cudatoolkit + ++ lib.optional ncclSupport nccl; + + cmakeFlags = lib.optionals cudaSupport [ "-DUSE_CUDA=ON" "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc" ] + ++ lib.optional ncclSupport "-DUSE_NCCL=ON"; + installPhase = '' mkdir -p $out - cp -r include $out - install -Dm755 lib/libxgboost.so $out/lib/libxgboost.so - install -Dm755 xgboost $out/bin/xgboost + cp -r ../include $out + install -Dm755 ../lib/libxgboost.so $out/lib/libxgboost.so + install -Dm755 ../xgboost $out/bin/xgboost ''; meta = with stdenv.lib; { |