31 , gpuSupport ? stdenv.isLinux && !cudaSupport
32 , cudaSupport ? config.cudaSupport
36 assert gpuSupport -> cudaSupport != true;
37 assert cudaSupport -> gpuSupport != true;
39 buildPythonPackage rec {
44 disabled = pythonOlder "3.7";
47 inherit pname version;
48 hash = "sha256-AG9XhKm87kPlp+lD3E8C3hui7np68e5fGQ04Pztsnr4=";
57 ] ++ lib.optionals cudaSupport [
58 cudaPackages.cuda_nvcc
61 dontUseCmakeConfigure = true;
63 buildInputs = (lib.optionals stdenv.cc.isClang [
65 ]) ++ (lib.optionals gpuSupport [
69 ]) ++ lib.optionals cudaSupport [
70 cudaPackages.cuda_nvcc
71 cudaPackages.cuda_cudart
74 propagatedBuildInputs = [
79 pypaBuildFlags = lib.optionals gpuSupport [
80 "--config-setting=cmake.define.USE_GPU=ON"
81 ] ++ lib.optionals cudaSupport [
82 "--config-setting=cmake.define.USE_CUDA=ON"
86 export HOME=$(mktemp -d)
89 passthru.optional-dependencies = {
97 ] ++ dask.optional-dependencies.array
98 ++ dask.optional-dependencies.dataframe
99 ++ dask.optional-dependencies.distributed;
108 # The pypi package doesn't distribute the tests from the GitHub
109 # repository. It contains c++ tests which don't seem to wired up to
113 pythonImportsCheck = [
118 description = "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework";
119 homepage = "https://github.com/Microsoft/LightGBM";
120 changelog = "https://github.com/microsoft/LightGBM/releases/tag/v${version}";
121 license = lib.licenses.mit;
122 maintainers = with lib.maintainers; [ teh ];