From fb2e964012a16c21feb718906b792854243a7ede Mon Sep 17 00:00:00 2001 From: Wael Nasreddine Date: Wed, 31 Jul 2019 18:29:11 -0700 Subject: [PATCH] python3Packages.xgboost: fix the build on Darwin (#65703) --- pkgs/development/python-modules/xgboost/default.nix | 2 ++ .../python-modules/xgboost/lib-path-for-python.patch | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/xgboost/default.nix b/pkgs/development/python-modules/xgboost/default.nix index bbe7c9862606..c75362436e4a 100644 --- a/pkgs/development/python-modules/xgboost/default.nix +++ b/pkgs/development/python-modules/xgboost/default.nix @@ -3,6 +3,7 @@ , nose , scipy , scikitlearn +, stdenv , xgboost , substituteAll , pandas @@ -19,6 +20,7 @@ buildPythonPackage rec { (substituteAll { src = ./lib-path-for-python.patch; libpath = "${xgboost}/lib"; + extention = stdenv.hostPlatform.extensions.sharedLibrary; }) ]; diff --git a/pkgs/development/python-modules/xgboost/lib-path-for-python.patch b/pkgs/development/python-modules/xgboost/lib-path-for-python.patch index 86c628c694bf..c9252c12fed1 100644 --- a/pkgs/development/python-modules/xgboost/lib-path-for-python.patch +++ b/pkgs/development/python-modules/xgboost/lib-path-for-python.patch @@ -35,4 +35,4 @@ index d87922c0..859a30fb 100644 - 'did you install compilers and run build.sh in root path?\n' - 'List of candidates:\n' + ('\n'.join(dll_path))) - return lib_path -+ return ["@libpath@/libxgboost.so"] ++ return ["@libpath@/libxgboost@extention@"]