Skip to content

Commit

Permalink
rPackages: Disable stackprotector on aarch64-darwin
Browse files Browse the repository at this point in the history
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`: NixOS#158992.
  • Loading branch information
ConnorBaker authored Mar 25, 2022
1 parent 0e0bb20 commit 78a439e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/development/r-modules/generic-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 78a439e

Please sign in to comment.