anchor.diff:  , enableAvx2 ? stdenv.hostPlatform.avx2Support
   , enableAvx512 ? stdenv.hostPlatform.avx512Support
   , enableFma ? stdenv.hostPlatform.fmaSupport
  +, enableMpi ? false
  +, mpi
   }:
   
   with lib;
  
positive.code: 
    nativeBuildInputs = [ gfortran ];
  
    buildInputs = lib.optionals stdenv.cc.isClang [
      # TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
      llvmPackages.openmp
    ];
  
    configureFlags =
      [ "--enable-shared"
  
negative.code:     ++ optional enableAvx512 "--enable-avx512"
      ++ optional enableFma "--enable-fma"
      ++ [ "--enable-openmp" ]
      ++ optional enableMpi "--enable-mpi"
      # doc generation causes Fortran wrapper generation which hard-codes gcc
      ++ optional (!withDoc) "--disable-doc";
  
  