diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index 6376bf4f08e8..f227a7f742f0 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -27,6 +27,7 @@ pkg-config, bison, which, + llvmPackages, jdk, blas, lapack, @@ -68,7 +69,10 @@ stdenv.mkDerivation (finalAttrs: { pkg-config tzdata which - ]; + ] + # TODO: Remove once #536365 reaches this branch + ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; + buildInputs = [ bzip2 gfortran @@ -126,6 +130,11 @@ stdenv.mkDerivation (finalAttrs: { dontDisableStatic = static; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + # TODO: Remove once #536365 reaches this branch + NIX_CFLAGS_LINK = "-fuse-ld=lld"; + }; + preConfigure = '' configureFlagsArray=( --disable-lto