summary refs log tree commit diff
path: root/pkgs/development/libraries/mpich
diff options
context:
space:
mode:
authorNoah D. Brenowitz <nbren12@gmail.com>2021-05-06 21:08:19 -0700
committerNoah D. Brenowitz <nbren12@gmail.com>2021-05-06 21:08:19 -0700
commita3d423090b8aaa441544dc1b9a2e8bd8843f5e7c (patch)
treeb15cb34b96efad4453e810591ec733bfb1f1f51d /pkgs/development/libraries/mpich
parente62feb3bf4a603e26755238303bda0c24651e155 (diff)
downloadnixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.tar
nixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.tar.gz
nixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.tar.bz2
nixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.tar.lz
nixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.tar.xz
nixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.tar.zst
nixpkgs-a3d423090b8aaa441544dc1b9a2e8bd8843f5e7c.zip
mpich: fix darwin build
The darwin build was failing because neither of the ch4backend libraries
build on darwin.

Changes:
* delete unused argument device
* pass the derivation for the ch4backend in directly rather than using
  a string to switch between two other arguments. (3 args to 1 arg)
* don't use ch4backend on Darwin

Resolves #121978
Diffstat (limited to 'pkgs/development/libraries/mpich')
-rw-r--r--pkgs/development/libraries/mpich/default.nix13
1 files changed, 5 insertions, 8 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;