diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 53d7f4585659..cba8d394c2ba 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -1,5 +1,7 @@ { stdenv, fetchurl, m4, cxx ? true }: +with { inherit (stdenv.lib) optional; }; + stdenv.mkDerivation rec { name = "gmp-5.1.3"; @@ -14,10 +16,12 @@ stdenv.mkDerivation rec { # Build a "fat binary", with routines for several sub-architectures # (x86), except on Solaris where some tests crash with "Memory fault". # See , for instance. - (stdenv.lib.optional (!stdenv.isSunOS) "--enable-fat") - ++ (if cxx then [ "--enable-cxx" "CPPFLAGS=-fexceptions" ] + optional (!stdenv.isSunOS) "--enable-fat" + ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]) - ++ (if stdenv.is64bit then [ "--with-pic" ] else []); + ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions" + ++ optional stdenv.is64bit "--with-pic" + ; doCheck = true; diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix index 2c22317a6ca7..e3b1444b8cb3 100644 --- a/pkgs/development/libraries/ppl/default.nix +++ b/pkgs/development/libraries/ppl/default.nix @@ -13,8 +13,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl gnum4 ]; propagatedBuildInputs = [ gmpxx ]; - configureFlags = [ "--disable-watchdog" "CPPFLAGS=-fexceptions" ] ++ + configureFlags = [ "--disable-watchdog" ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "CPPFLAGS=-fexceptions" "--disable-ppl_lcdd" "--disable-ppl_lpsol" "--disable-ppl_pips" ];