From 0beb81535c161726947e0f1801b682653d8a6519 Mon Sep 17 00:00:00 2001 From: qbisi Date: Tue, 2 Dec 2025 05:56:00 +0800 Subject: [PATCH] superlu_dist: fix build with mpich --- pkgs/by-name/su/superlu_dist/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/su/superlu_dist/package.nix b/pkgs/by-name/su/superlu_dist/package.nix index 2cb3af3d2532..c300133a5157 100644 --- a/pkgs/by-name/su/superlu_dist/package.nix +++ b/pkgs/by-name/su/superlu_dist/package.nix @@ -18,6 +18,7 @@ isILP64 ? false, # passthru.tests + mpich, superlu_dist, }: @@ -36,6 +37,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-i/Gg+9oMNNRlviwXUSRkWNaLRZLPWZRtA1fGYqh2X0k="; }; + # --oversubscribe unrecognized by mpich + # see https://github.com/xiaoyeli/superlu_dist/issues/208 + postPatch = '' + substituteInPlace TEST/CMakeLists.txt \ + --replace-fail "-oversubscribe" "" + ''; + patches = [ ./mc64ad_dist-stub.patch ]; @@ -89,6 +97,11 @@ stdenv.mkDerivation (finalAttrs: { inherit isILP64; tests = { ilp64 = superlu_dist.override { isILP64 = true; }; + } + // lib.optionalAttrs stdenv.hostPlatform.isLinux { + mpich = superlu_dist.override { + mpi = mpich; + }; }; };