diff options
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/hdf5/default.nix | 11 | ||||
-rw-r--r-- | pkgs/tools/misc/hpcg/default.nix | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 0a5032074c1..fc7bb635040 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -5,13 +5,14 @@ , gfortran ? null , zlib ? null , szip ? null -, mpi ? null +, mpiSupport ? false +, mpi , enableShared ? !stdenv.hostPlatform.isStatic }: # cpp and mpi options are mutually exclusive # (--enable-unsupported could be used to force the build) -assert !cpp || mpi == null; +assert !cpp || !mpiSupport; let inherit (lib) optional optionals; in @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { }; passthru = { - mpiSupport = (mpi != null); + inherit mpiSupport; inherit mpi; }; @@ -38,13 +39,13 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [] ++ optional (zlib != null) zlib - ++ optional (mpi != null) mpi; + ++ optional mpiSupport mpi; configureFlags = [] ++ optional cpp "--enable-cxx" ++ optional (gfortran != null) "--enable-fortran" ++ optional (szip != null) "--with-szlib=${szip}" - ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"] + ++ optionals mpiSupport ["--enable-parallel" "CC=${mpi}/bin/mpicc"] ++ optional enableShared "--enable-shared"; patches = [ diff --git a/pkgs/tools/misc/hpcg/default.nix b/pkgs/tools/misc/hpcg/default.nix index 29799641880..d6896527ad2 100644 --- a/pkgs/tools/misc/hpcg/default.nix +++ b/pkgs/tools/misc/hpcg/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openmpi } : +{ lib, stdenv, fetchurl, mpi } : stdenv.mkDerivation rec { pname = "hpcg"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ openmpi ]; + buildInputs = [ mpi ]; makeFlags = [ "arch=Linux_MPI" ]; |