<commit_before>{ fetchurl, stdenv, cmake, perl, ruby, boost, lua5_1, graphviz, libsigcxx
, libunwind, elfutils
}:

stdenv.mkDerivation rec {
  version = "3.11.1";
  name = "simgrid-${version}";

  src = fetchurl {
    url = "https://gforge.inria.fr/frs/download.php/33686/${name}.tar.gz";
    sha256 = "0mkrzxpf42lmn96khfl1791vram67r2nqsgmppd2yil889nyz5kp";
  };

  buildInputs = [ cmake perl ruby boost lua5_1 graphviz libsigcxx libunwind
    elfutils
    ];

  preConfigure =
    # Make it so that libsimgrid.so will be found when running programs from
    # the build dir.
    '' export LD_LIBRARY_PATH="$PWD/src/.libs"
       export cmakeFlags="-Dprefix=$out"

       export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE
         -isystem $(echo "${libsigcxx}/lib/"sigc++*/include)
	 -isystem $(echo "${libsigcxx}/include"/sigc++* )
	 "
       export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:$(echo "${libsigcxx}/lib/"sigc++*)"

       # Enable more functionality.
       export cmakeFlags="$cmakeFlags -Denable_tracing=on -Denable_jedule=on
         -Denable_latency_bound_tracking=on -Denable_lua=on
	 -Denable_ns3=on -Denable_gtnets=on
	 "
    '';

  makeFlags = "VERBOSE=1";

  preBuild =
    /* Work around this:
<commit_msg>simgrid: 3.11.1 -> 3.15<commit_after>{ fetchurl, stdenv, cmake, perl, ruby, boost, lua5_3, graphviz, libsigcxx
, libunwind, elfutils, python3, doxygen
}:

stdenv.mkDerivation rec {
  version = "3.15";
  name = "simgrid-${version}";

  src = fetchurl {
    url = "https://gforge.inria.fr/frs/download.php/36621/${name}.tar.gz";
    sha256 = "1s595wc4z8hkvim3ypfdxy16pply6ckjg10v84cc0lx9pz6i3r6i";
  };

  buildInputs = [ cmake perl ruby boost lua5_3 graphviz libsigcxx libunwind
    elfutils python3 doxygen
    ];

  preConfigure =
    # Make it so that libsimgrid.so will be found when running programs from
    # the build dir.
    '' export LD_LIBRARY_PATH="$PWD/src/.libs"
       export cmakeFlags="-Dprefix=$out"

       export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE
         -isystem $(echo "${libsigcxx}/lib/"sigc++*/include)
	 -isystem $(echo "${libsigcxx}/include"/sigc++* )
	 "
       export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:$(echo "${libsigcxx}/lib/"sigc++*)"

       # Enable more functionality.
       export cmakeFlags="$cmakeFlags -Denable_tracing=on -Denable_jedule=on
         -Denable_latency_bound_tracking=on -Denable_lua=on
	 -Denable_ns3=off -Denable_gtnets=on
	 "
    '';

  makeFlags = "VERBOSE=1";

  preBuild =
    /* Work around this:

{'fraction_non_alphanumeric': 0.13437625350982751, 'fraction_numerical': 0.032089851584436425, 'mean_word_length': 3.593001841620626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4326741', 'n_tokens_mistral': 1009, 'n_tokens_neox': 938, 'n_words': 170}