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 8 , enableShared ? true 9 9 }: 10 10 11 - with { inherit (stdenv.lib) optional; }; 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; }; 12 16 13 17 stdenv.mkDerivation rec { 14 18 version = "1.8.16"; ··· 35 39 ++ optional cpp "--enable-cxx" 36 40 ++ optional (gfortran != null) "--enable-fortran" 37 41 ++ optional (szip != null) "--with-szlib=${szip}" 38 - ++ optional (mpi != null) "--enable-parallel" 42 + ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"] 39 43 ++ optional enableShared "--enable-shared"; 40 44 41 45 patches = [./bin-mv.patch];