diff --git a/pkgs/development/libraries/science/math/petsc/default.nix b/pkgs/development/libraries/science/math/petsc/default.nix index efedbe725af1..e1ce4b497470 100644 --- a/pkgs/development/libraries/science/math/petsc/default.nix +++ b/pkgs/development/libraries/science/math/petsc/default.nix @@ -16,6 +16,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ blas gfortran.cc.lib liblapack python ]; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace config/install.py \ + --replace /usr/bin/install_name_tool install_name_tool + ''; + preConfigure = '' patchShebangs . configureFlagsArray=(