From afa9e26130be960333b7d8921d2776ce2fa230e6 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Fri, 20 Nov 2015 09:59:22 +0000 Subject: [PATCH] pkgs.hdf5: Fix mpi build @vcunat fixed the assertion (which was his wrong suggestion). --- pkgs/tools/misc/hdf5/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 8c32f95b0149..84945d27dd18 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -8,7 +8,11 @@ , enableShared ? true }: -with { inherit (stdenv.lib) optional; }; +# cpp and mpi options are mutually exclusive +# (--enable-unsupported could be used to force the build) +assert !cpp || mpi == null; + +with { inherit (stdenv.lib) optional optionals; }; stdenv.mkDerivation rec { version = "1.8.16"; @@ -35,7 +39,7 @@ stdenv.mkDerivation rec { ++ optional cpp "--enable-cxx" ++ optional (gfortran != null) "--enable-fortran" ++ optional (szip != null) "--with-szlib=${szip}" - ++ optional (mpi != null) "--enable-parallel" + ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"] ++ optional enableShared "--enable-shared"; patches = [./bin-mv.patch];