rPackages: Disable stackprotector on aarch64-darwin

Some derivations, like `rPackages.KernSmooth`, fail to build on `aarch64-darwin` because `stackprotector` is enabled.

This is similar to the fix required to get R itself working on `aarch64-darwin`: https://github.com/NixOS/nixpkgs/pull/158992.
This commit is contained in:
Connor Baker 2022-03-25 11:35:37 -04:00 committed by GitHub
parent 0e0bb200ff
commit 78a439e514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,8 @@ stdenv.mkDerivation ({
NIX_CFLAGS_COMPILE =
lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
configurePhase = ''
runHook preConfigure
export R_LIBS_SITE="$R_LIBS_SITE''${R_LIBS_SITE:+:}$out/library"