From fe3267ac396a3ed66fc250acb0d56a160845dbd9 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Wed, 5 Nov 2014 10:37:11 +0100 Subject: [PATCH] boost: Add optional Boost.MPI support Boost.MPI is a C++ interface library to the message passing interface (MPI) standard. --- pkgs/development/libraries/boost/generic.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index fdfc8b45a683..ee1d0f245cfb 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -9,6 +9,7 @@ , enablePIC ? false , enableExceptions ? false , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) +, mpi ? null # Attributes inherit from specific versions , version, src @@ -64,7 +65,8 @@ let nativeB2Flags = [ "-sEXPAT_INCLUDE=${expat}/include" "-sEXPAT_LIBPATH=${expat}/lib" - ] ++ optional (toolset != null) "toolset=${toolset}"; + ] ++ optional (toolset != null) "toolset=${toolset}" + ++ optional (mpi != null) "--user-config=user-config.jam"; nativeB2Args = concatStringsSep " " (genericB2Flags ++ nativeB2Flags); crossB2Flags = [ @@ -122,6 +124,10 @@ stdenv.mkDerivation { substituteInPlace tools/build/src/tools/clang-darwin.jam \ --replace '$(<[1]:D=)' "$lib/lib/\$(<[1]:D=)"; fi; + '' + optionalString (mpi != null) '' + cat << EOF > user-config.jam + using mpi : ${mpi}/bin/mpiCC ; + EOF ''; NIX_CFLAGS_LINK = stdenv.lib.optionalString stdenv.isDarwin