From ed23412520f4a38dac88b9b16f3c34b14428f9b5 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 13 Jul 2019 19:02:06 +0100 Subject: [PATCH] pythonPackages.lightgbm: fix build on darwin --- .../python-modules/lightgbm/default.nix | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index fee314aa6c3..10dbcafd04b 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -1,10 +1,11 @@ -{ lib +{ stdenv , buildPythonPackage , fetchPypi , cmake , numpy , scipy , scikitlearn +, llvmPackages ? null }: buildPythonPackage rec { @@ -20,6 +21,19 @@ buildPythonPackage rec { cmake ]; + # we never actually explicitly call the install command so this is the only way + # to inject these options to it - however, openmp-library doesn't appear to have + # any effect, so we have to inject it into NIX_LDFLAGS manually below + postPatch = stdenv.lib.optionalString stdenv.cc.isClang '' + cat >> setup.cfg <