11 buildPythonPackage rec {
16 inherit pname version;
17 sha256 = "000c6e0e225834a8a94a84571cf41e4b7c7b97a0db6d286c1237de8ba6066726";
24 dontUseCmakeConfigure = true;
26 # we never actually explicitly call the install command so this is the only way
27 # to inject these options to it - however, openmp-library doesn't appear to have
28 # any effect, so we have to inject it into NIX_LDFLAGS manually below
29 postPatch = lib.optionalString stdenv.cc.isClang ''
30 cat >> setup.cfg <<EOF
33 openmp-include-dir=${llvmPackages.openmp}/include
34 openmp-library=${llvmPackages.openmp}/lib/libomp.dylib
39 propagatedBuildInputs = [
46 export HOME=$(mktemp -d)
47 '' + lib.optionalString stdenv.cc.isClang ''
48 export NIX_LDFLAGS="$NIX_LDFLAGS -L${llvmPackages.openmp}/lib -lomp"
51 # The pypi package doesn't distribute the tests from the GitHub
52 # repository. It contains c++ tests which don't seem to wired up to
57 description = "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework";
58 homepage = "https://github.com/Microsoft/LightGBM";
59 license = licenses.mit;
60 maintainers = with maintainers; [ teh costrouc ];