diff options
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 7 | ||||
-rw-r--r-- | pkgs/development/libraries/globalarrays/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/precice/default.nix | 4 |
3 files changed, 8 insertions, 7 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 diff --git a/pkgs/development/libraries/globalarrays/default.nix b/pkgs/development/libraries/globalarrays/default.nix index 049e262bb17..1f70946cbce 100644 --- a/pkgs/development/libraries/globalarrays/default.nix +++ b/pkgs/development/libraries/globalarrays/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchpatch, fetchFromGitHub, autoreconfHook -, blas, gfortran, openssh, openmpi +, blas, gfortran, openssh, mpi } : let @@ -17,7 +17,7 @@ in stdenv.mkDerivation { }; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ openmpi blas gfortran openssh ]; + buildInputs = [ mpi blas gfortran openssh ]; preConfigure = '' configureFlagsArray+=( "--enable-i8" \ diff --git a/pkgs/development/libraries/precice/default.nix b/pkgs/development/libraries/precice/default.nix index e9e67737d32..10a80ebb91e 100644 --- a/pkgs/development/libraries/precice/default.nix +++ b/pkgs/development/libraries/precice/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, openmpi, python3, petsc }: +{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, mpi, python3, petsc }: stdenv.mkDerivation rec { pname = "precice"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [ "-D_GNU_SOURCE" ]; nativeBuildInputs = [ cmake gcc ]; - buildInputs = [ boost eigen libxml2 openmpi python3 python3.pkgs.numpy ]; + buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ]; meta = { description = "preCICE stands for Precise Code Interaction Coupling Environment"; |