lammps: add mpich to nativeBuildInputs if needed

Before `strictDeps` was enabled in
b2d648ff9b, the `MPIIO` package could have
worked with `mpich` added to `buildInputs`. However this was wrong and
made the compilation fail (with `MPIIO = true;` set by user override in
`packages` attribute set). To make it easier for users who want to
include MPI support in lammps, we take care of adding `mpich` by
ourselves.
This commit is contained in:
Doron Behar
2026-07-13 17:23:48 +03:00
parent 4804262cb2
commit 82f8c9dd91
+5
View File
@@ -8,6 +8,7 @@
blas,
lapack,
python3,
mpich,
cmake,
autoAddDriverRunpath,
pkg-config,
@@ -39,6 +40,7 @@
SRD = true;
REAXFF = true;
PYTHON = true;
MPIIO = true;
},
# Extra cmakeFlags to add as "-D${attr}=${value}"
extraCmakeFlags ? { },
@@ -73,6 +75,9 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optionals packages.PYTHON [
python3
]
++ lib.optionals packages.MPIIO [
mpich
];
passthru = {