anchor.diff:  
   stdenv.mkDerivation rec {
     pname = "simgrid";
  -  version = "3.28";
  +  version = "3.30";
   
     src = fetchFromGitLab {
       domain = "framagit.org";
       owner = pname;
       repo = pname;
       rev = "v${version}";
  -    sha256 = "0vylwgd4i89bvhbgfay0wq953324dwfmmr8jp9b4vvlc9m0017r9";
  +    sha256 = "1dg8ywqif20g0fs8dnd6364n080nvwx7f444zcfwqwz6iax61qv1";
     };
   
  -  patches = [
  -    (fetchpatch {
  -      name = "fix-smpi-dirs-absolute.patch";
  -      url = "https://framagit.org/simgrid/simgrid/-/commit/71f01e667577be1076646eb841e0a57bd5388545.patch";
  -      sha256 = "0x3y324b6269687zfy43ilc48bwrs4nb7svh2mpg88lrz53rky15";
  -    })
  -  ];
  +  propagatedBuildInputs = [ boost ];
  +  nativeBuildInputs = [ cmake perl python3 ]
  +    ++ optionals fortranSupport [ gfortran ]
  +    ++ optionals buildJavaBindings [ openjdk ]
  +    ++ optionals buildPythonBindings [ python3Packages.pybind11 ]
  +    ++ optionals buildDocumentation [ fig2dev ghostscript doxygen ]
  +    ++ optionals modelCheckingSupport [ libunwind libevent elfutils ];
   
  -  propagatedBuildInputs = [ boost ];
  -  nativeBuildInputs = [ cmake perl python3 valgrind ]
  -      ++ optionals fortranSupport [ gfortran ]
  -      ++ optionals buildJavaBindings [ openjdk ]
  -      ++ optionals buildDocumentation [ fig2dev ghostscript doxygen ]
  -      ++ optionals modelCheckingSupport [ libunwind libevent elfutils ];
  +  outputs = [ "out" ]
  +    ++ optionals buildPythonBindings [ "python" ];
   
  -  #buildInputs = optional luaSupport lua5;
  -
  -  # Make it so that libsimgrid.so will be found when running programs from
  -  # the build dir.
  -  preConfigure = ''
  -    export LD_LIBRARY_PATH="$PWD/build/lib"
  -  '';
  -
  -  # Release mode is not supported in SimGrid
  +  # "Release" does not work. non-debug mode is Debug compiled with optimization
     cmakeBuildType = "Debug";
  -
  -  # Disable/Enable functionality
  -  # Note: those packages are not packaged in Nixpkgs yet so some options
  -  # are disabled:
  -  # - papi:   for enable_smpi_papi
  -  # - ns3:    for enable_ns3
  -  # - lua53:  for enable_lua
  -  #
  -  # For more information see:
  -  # https://simgrid.org/doc/3.22/Installing_SimGrid.html#simgrid-compilation-options)
     cmakeFlags = [
       "-Denable_documentation=${optionOnOff buildDocumentation}"
       "-Denable_java=${optionOnOff buildJavaBindings}"
  +    "-Denable_python=${optionOnOff buildPythonBindings}"
  +    "-DSIMGRID_PYTHON_LIBDIR=./" # prevents CMake to install in ${python3} dir
  +    "-Denable_msg=${optionOnOff buildJavaBindings}"
       "-Denable_fortran=${optionOnOff fortranSupport}"
       "-Denable_model-checking=${optionOnOff modelCheckingSupport}"
       "-Denable_ns3=off"
  
positive.code:     "-Denable_mallocators=on"
      "-Denable_debug=on"
      "-Denable_smpi=on"
      "-Denable_smpi_ISP_testsuite=${optionOnOff moreTests}"
      "-Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}"
      "-Denable_compile_warnings=${optionOnOff debug}"
      "-Denable_compile_optimizations=${optionOnOff (!debug)}"
      "-Denable_lto=${optionOnOff (!debug)}"
      # "-Denable_lua=${optionOnOff luaSupport}"
      # "-Denable_smpi_papi=${optionOnOff moreTests}"
    ];
  
    makeFlags = optional debug "VERBOSE=1";
  
    # Some Perl scripts are called to generate test during build which
    # is before the fixupPhase, so do this manualy here:
    preBuild = ''
      patchShebangs ..
    '';
  
    doCheck = true;
  
    # Prevent the execution of tests known to fail.
    preCheck = ''
      cat <<EOW >CTestCustom.cmake
      SET(CTEST_CUSTOM_TESTS_IGNORE smpi-replay-multiple)
      EOW
  
negative.code: { stdenv, lib, fetchFromGitLab, cmake, perl, python3, boost
  , fortranSupport ? false, gfortran
  , buildDocumentation ? false, fig2dev, ghostscript, doxygen
  , buildJavaBindings ? false, openjdk
  , buildPythonBindings ? true, python3Packages
  , modelCheckingSupport ? false, libunwind, libevent, elfutils # Inside elfutils: libelf and libdw
  , minimalBindings ? false
  , debug ? false
  , optimize ? (!debug)
  , moreTests ? false
  , withoutBin ? false
  }:
  
  with lib;
  