From ee11d8403e252bedbbf21b76eb27c4de1287469c Mon Sep 17 00:00:00 2001 From: Rohit Singh Date: Tue, 10 Feb 2026 02:08:13 -0500 Subject: [PATCH] xgboost: avoid R build dependency when unused --- pkgs/by-name/xg/xgboost/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/xg/xgboost/package.nix b/pkgs/by-name/xg/xgboost/package.nix index 134da018efd4..cff46786a729 100644 --- a/pkgs/by-name/xg/xgboost/package.nix +++ b/pkgs/by-name/xg/xgboost/package.nix @@ -105,7 +105,7 @@ effectiveStdenv.mkDerivation rec { env = { # on Darwin, cmake uses find_library to locate R instead of using the PATH - NIX_LDFLAGS = "-L${R}/lib/R/lib"; + NIX_LDFLAGS = lib.optionalString rLibrary "-L${R}/lib/R/lib"; # Disable finicky tests from dmlc core that fail in Hydra. XGboost team # confirmed xgboost itself does not use this part of the dmlc code.