<commit_before>{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11}:

stdenv.mkDerivation rec {
  name = "mono-2.11.4";
  src = fetchurl {
    url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2";
    sha256 = "0wv8pnj02mq012sihx2scx0avyw51b5wb976wn7x86zda0vfcsnr";
  };

  buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11];
  propagatedBuildInputs = [glib];

  NIX_LDFLAGS = "-lgcc_s" ;

  # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723
  dontDisableStatic = true;

  # In fact I think this line does not help at all to what I
  # wanted to achieve: have mono to find libgdiplus automatically
  configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib --with-libgdiplus=${libgdiplus}/lib/libgdiplus.so";

  # Attempt to fix this error when running "mcs --version":
  # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
  dontStrip = true;

  # Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
  enableParallelBuilding = false;

  preBuild = "
    makeFlagsArray=(INSTALL=`type -tp install`)
    patchShebangs ./
  ";

  #Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps
  #Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive<commit_msg>mono: 2.11.4 -> 3.2.8<commit_after>{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11}:

stdenv.mkDerivation rec {
  name = "mono-${version}";
  version = "3.2.8";
  src = fetchurl {
    url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2";
    sha256 = "0h0s42pmgrhwqaym0b1401h70dcpr179ngcsp7f8i4hl4snqrd7x";
  };

  buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11];
  propagatedBuildInputs = [glib];

  NIX_LDFLAGS = "-lgcc_s" ;

  # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723
  dontDisableStatic = true;

  # In fact I think this line does not help at all to what I
  # wanted to achieve: have mono to find libgdiplus automatically
  configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib --with-libgdiplus=${libgdiplus}/lib/libgdiplus.so";

  # Attempt to fix this error when running "mcs --version":
  # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
  dontStrip = true;

  # Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
  enableParallelBuilding = false;

  preBuild = "
    makeFlagsArray=(INSTALL=`type -tp install`)
    patchShebangs ./
  ";

  #Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps
  #Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive
{'fraction_non_alphanumeric': 0.11688777339548226, 'fraction_numerical': 0.04087486554320545, 'mean_word_length': 3.8947368421052633, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4430342', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1001, 'n_words': 267}