diff options
author | Markus Kowalewski <markus.kowalewski@gmail.com> | 2021-01-10 13:40:19 +0100 |
---|---|---|
committer | Markus Kowalewski <markus.kowalewski@gmail.com> | 2021-01-23 12:15:13 +0100 |
commit | 6dba41fbcb4239a628ac5bdf0035882a679b8648 (patch) | |
tree | a11ed2cef0b00b88ba8e99a8d30f8890aec90781 /pkgs/development/libraries/boost | |
parent | f6a583eeece936a1d917de67194fec4b6c74cf1f (diff) | |
download | nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.tar nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.tar.gz nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.tar.bz2 nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.tar.lz nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.tar.xz nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.tar.zst nixpkgs-6dba41fbcb4239a628ac5bdf0035882a679b8648.zip |
mpi: use mpi attribute consistently as the default MPI implementations
Use the attribute mpi to provide a system wide default MPI implementation. The default is openmpi (as before). This now allows for overriding the MPI implentation by using the overlay mechanism. Build all packages with mpich instead of the default openmpi can now be achived like this: self: super: { mpi = super.mpich; } All derivations that have been using "mpi ? null" to provide optional building with MPI have been change in the following way to allow for optional builds with MPI: { ... , mpi , useMpi ? false }
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 5a2b437d41d..abff1268bfa 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -14,7 +14,8 @@ , enableNumpy ? false , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) , patches ? [] -, mpi ? null +, useMpi ? false +, mpi , extraB2Args ? [] # Attributes inherit from specific versions @@ -94,7 +95,7 @@ let ++ optional (variant == "release") "debug-symbols=off" ++ optional (toolset != null) "toolset=${toolset}" ++ optional (!enablePython) "--without-python" - ++ optional (mpi != null || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam" + ++ optional (useMpi || stdenv.hostPlatform != stdenv.buildPlatform) "--user-config=user-config.jam" ++ optionals (stdenv.hostPlatform.libc == "msvcrt") [ "threadapi=win32" ] ++ extraB2Args @@ -140,7 +141,7 @@ stdenv.mkDerivation { substituteInPlace tools/build/src/tools/clang-darwin.jam \ --replace '@rpath/$(<[1]:D=)' "$out/lib/\$(<[1]:D=)"; fi; - '' + optionalString (mpi != null) '' + '' + optionalString useMpi '' cat << EOF >> user-config.jam using mpi : ${mpi}/bin/mpiCC ; EOF |