From 4f5137569b39e844a9e816ef6be0dd4804c0bc81 Mon Sep 17 00:00:00 2001 From: Carsten Burstedde Date: Fri, 12 Nov 2021 17:29:12 +0100 Subject: [PATCH] petsc, p4est: strict dependencies (#130156) --- .../development/libraries/science/math/p4est-sc/default.nix | 5 +++-- pkgs/development/libraries/science/math/p4est/default.nix | 1 + pkgs/development/libraries/science/math/petsc/default.nix | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/science/math/p4est-sc/default.nix b/pkgs/development/libraries/science/math/p4est-sc/default.nix index 338101b80b56..eeb1d14b910a 100644 --- a/pkgs/development/libraries/science/math/p4est-sc/default.nix +++ b/pkgs/development/libraries/science/math/p4est-sc/default.nix @@ -22,11 +22,12 @@ stdenv.mkDerivation { sha256 = "14vm0b162jh8399pgpsikbwq4z5lkrw9vfzy3drqykw09n6nc53z"; }; + strictDeps = true; nativeBuildInputs = [ autoreconfHook pkg-config ]; - propagatedBuildInputs = [ zlib ] - ++ lib.optional mpiSupport mpi + propagatedNativeBuildInputs = lib.optional mpiSupport mpi ++ lib.optional isOpenmpi openssh ; + propagatedBuildInputs = [ zlib ]; inherit debugEnable mpiSupport; postPatch = '' diff --git a/pkgs/development/libraries/science/math/p4est/default.nix b/pkgs/development/libraries/science/math/p4est/default.nix index 68c71ab59be1..c38b0d623bac 100644 --- a/pkgs/development/libraries/science/math/p4est/default.nix +++ b/pkgs/development/libraries/science/math/p4est/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation { sha256 = "0vffnf48rzw6d0as4c3x1f31b4kapmdzr1hfj5rz5ngah72gqrph"; }; + strictDeps = true; nativeBuildInputs = [ autoreconfHook pkg-config ]; propagatedBuildInputs = [ p4est-sc ]; buildInputs = lib.optional withMetis metis; diff --git a/pkgs/development/libraries/science/math/petsc/default.nix b/pkgs/development/libraries/science/math/petsc/default.nix index cbd5fa879ee7..1bffb41806c5 100644 --- a/pkgs/development/libraries/science/math/petsc/default.nix +++ b/pkgs/development/libraries/science/math/petsc/default.nix @@ -28,10 +28,12 @@ stdenv.mkDerivation rec { mpiSupport = !withp4est || p4est.mpiSupport; withp4est = petsc-withp4est; - nativeBuildInputs = [ python3 gfortran ]; - buildInputs = [ blas lapack ] + strictDeps = true; + nativeBuildInputs = [ python3 gfortran ] ++ lib.optional mpiSupport mpi ++ lib.optional (mpiSupport && mpi.pname == "openmpi") openssh + ; + buildInputs = [ blas lapack ] ++ lib.optional withp4est p4est ;