diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 54ca047acdd9..6c64228249e1 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -15,9 +15,15 @@ , llvmPackages , numpy , scipy -, scikit-learn , pythonOlder +# optionals +, cffi +, dask +, pandas +, pyarrow +, scikit-learn + # optionals: gpu , boost , ocl-icd @@ -32,14 +38,14 @@ assert cudaSupport -> gpuSupport != true; buildPythonPackage rec { pname = "lightgbm"; - version = "4.1.0"; - format = "pyproject"; + version = "4.2.0"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-vuWd0mmpOwk/LGENSmaDp+qHxj0+o1xiISPOLAILKrw="; + hash = "sha256-ik0FHfKrIhiZihb3cS6EPunpbYsJ/7/MGFM9oSfg2gI="; }; nativeBuildInputs = [ @@ -68,7 +74,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikit-learn ]; pypaBuildFlags = lib.optionals gpuSupport [ @@ -81,6 +86,25 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; + passthru.optional-dependencies = { + arrow = [ + cffi + pyarrow + ]; + dask = [ + dask + pandas + ] ++ dask.optional-dependencies.array + ++ dask.optional-dependencies.dataframe + ++ dask.optional-dependencies.distributed; + pandas = [ + pandas + ]; + scikit-learn = [ + scikit-learn + ]; + }; + # The pypi package doesn't distribute the tests from the GitHub # repository. It contains c++ tests which don't seem to wired up to # `make check`.