pkgs.hdf5: Fix mpi build

@vcunat fixed the assertion (which was his wrong suggestion).

authored by Lancelot SIX and committed by Vladimír Čunát afa9e261 4d28d46c

+6 -2
+6 -2
pkgs/tools/misc/hdf5/default.nix
··· 8 , enableShared ? true 9 }: 10 11 - with { inherit (stdenv.lib) optional; }; 12 13 stdenv.mkDerivation rec { 14 version = "1.8.16"; ··· 35 ++ optional cpp "--enable-cxx" 36 ++ optional (gfortran != null) "--enable-fortran" 37 ++ optional (szip != null) "--with-szlib=${szip}" 38 - ++ optional (mpi != null) "--enable-parallel" 39 ++ optional enableShared "--enable-shared"; 40 41 patches = [./bin-mv.patch];
··· 8 , enableShared ? true 9 }: 10 11 + # cpp and mpi options are mutually exclusive 12 + # (--enable-unsupported could be used to force the build) 13 + assert !cpp || mpi == null; 14 + 15 + with { inherit (stdenv.lib) optional optionals; }; 16 17 stdenv.mkDerivation rec { 18 version = "1.8.16"; ··· 39 ++ optional cpp "--enable-cxx" 40 ++ optional (gfortran != null) "--enable-fortran" 41 ++ optional (szip != null) "--with-szlib=${szip}" 42 + ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"] 43 ++ optional enableShared "--enable-shared"; 44 45 patches = [./bin-mv.patch];