summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/mpich/default.nix13
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 8 insertions, 9 deletions
diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix
index 49af2593e51..d2cbee14c3a 100644
--- a/pkgs/development/libraries/mpich/default.nix
+++ b/pkgs/development/libraries/mpich/default.nix
@@ -1,15 +1,13 @@
 { stdenv, lib, fetchurl, perl, gfortran
 , openssh, hwloc, autoconf, automake, libtool
-# device options are ch3 or ch4
-, device ? "ch4"
-# backend option are libfabric or ucx
-, ch4backend ? "libfabric"
-, ucx, libfabric
+# either libfabric or ucx work for ch4backend on linux. On darwin, neither of
+# these libraries currently build so this argument is ignored on Darwin.
+, ch4backend
 # Process manager to build
 , withPm ? "hydra:gforker"
 } :
 
-assert (ch4backend == "ucx" || ch4backend == "libfabric");
+assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric");
 
 stdenv.mkDerivation  rec {
   pname = "mpich";
@@ -45,8 +43,7 @@ stdenv.mkDerivation  rec {
   enableParallelBuilding = true;
 
   buildInputs = [ perl gfortran openssh hwloc ]
-    ++ lib.optional (ch4backend == "ucx") ucx
-    ++ lib.optional (ch4backend == "libfabric") libfabric;
+    ++ lib.optional (!stdenv.isDarwin) ch4backend;
 
   doCheck = true;
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d8e77bcf6d4..47cfb79b2c4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16711,7 +16711,9 @@ in
 
   libmpc = callPackage ../development/libraries/libmpc { };
 
-  mpich = callPackage ../development/libraries/mpich { };
+  mpich = callPackage ../development/libraries/mpich {
+    ch4backend = libfabric;
+  };
 
   mstpd = callPackage ../os-specific/linux/mstpd { };