From 78a439e5143ddf9e1cb0e485ea05e74f61635b40 Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Fri, 25 Mar 2022 11:35:37 -0400 Subject: [PATCH] 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. --- pkgs/development/r-modules/generic-builder.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/r-modules/generic-builder.nix b/pkgs/development/r-modules/generic-builder.nix index 880fff44ed644..beb669d9893f4 100644 --- a/pkgs/development/r-modules/generic-builder.nix +++ b/pkgs/development/r-modules/generic-builder.nix @@ -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"