From 545444cd19f5ad60041886b01f194f8cb2f1d989 Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sun, 17 Jan 2016 11:06:03 +0100 Subject: [PATCH] R: add a new `enableStrictBarrier` package option. This option compiles R with --enable-strict-barrier. Doing so is enables extra memory diagnostics in R that very useful for debugging memory leak or memory protections issues in extensions to R written in C, or for any apps embedding R (e.g. Haskell aps embedding R via HaskellR). --- pkgs/applications/science/math/R/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index edbf8a843a5..e7a19565949 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -3,6 +3,7 @@ , less, texinfo, graphviz, icu, pkgconfig, bison, imake, which, jdk, openblas , curl, Cocoa, Foundation, cf-private, libobjc, tzdata , withRecommendedPackages ? true +, enableStrictBarrier ? false }: stdenv.mkDerivation rec { @@ -39,6 +40,7 @@ stdenv.mkDerivation rec { --with-system-pcre --with-system-xz --with-ICU + ${stdenv.lib.optionalString enableStrictBarrier "--enable-strict-barrier"} --enable-R-shlib AR=$(type -p ar) AWK=$(type -p gawk)