<commit_before>{ stdenv, fetchurl, pkgconfig, mono
, glib
, pango
, gtk2
, GConf ? null
, libglade ? null
, libgtkhtml ? null
, gtkhtml ? null
, libgnomecanvas ? null
, libgnomeui ? null
, libgnomeprint ? null
, libgnomeprintui ? null
, libxml2
, monoDLLFixer
}:

stdenv.mkDerivation {
  name = "gtk-sharp-2.12.10";

  builder = ./builder.sh;
  src = fetchurl {
    url = mirror://gnome/sources/gtk-sharp/2.12/gtk-sharp-2.12.10.tar.gz;
    sha256 = "1y55vc2cp4lggmbil2lb28d0gn71iq6wfyja1l9mya5xll8svzwc";
  };

  # patches = [ ./dllmap-glue.patch ];

  # patch bad usage of glib, which wasn't tolerated anymore
  prePatch = ''
    for f in glib/glue/{thread,list,slist}.c; do
      sed -i 's,#include <glib/.*\.h>,#include <glib.h>,g' "$f"
    done
  '';

  postInstall = ''
    pushd $out/bin
    for f in gapi2-*
    do
      substituteInPlace $f --replace mono ${mono}/bin/mono
    done
    popd
  '';

  nativeBuildInputs = [ pkgconfig ];

  buildInputs = [
    mono glib pango gtk2 GConf libglade libgnomecanvas
    libgtkhtml libgnomeui libgnomeprint libgnomeprintui gtkhtml libxml2
  ];

  dontStrip = true;

  inherit monoDLLFixer;

  passthru = {
    gtk = gtk2;
  };

  meta = with stdenv.lib; {
    description = "Graphical User Interface Toolkit for mono and .Net";
    homepage = https://www.mono-project.com/docs/gui/gtksharp;
    platforms = platforms.linux;
    license = licenses.gpl2;
  };
}<commit_msg>gtk-sharp: 2.12.10 -> 2.12.45<commit_after>{ stdenv
, lib
, fetchFromGitHub
, pkgconfig
, mono
, glib
, pango
, gtk2
, GConf ? null
, libglade ? null
, libgtkhtml ? null
, gtkhtml ? null
, libgnomecanvas ? null
, libgnomeui ? null
, libgnomeprint ? null
, libgnomeprintui ? null
, libxml2
, monoDLLFixer
, autoconf
, automake
, libtool
, which
}:

stdenv.mkDerivation rec {
  name = "gtk-sharp-${version}";
  version = "2.12.45";

  builder = ./builder.sh;
  src = fetchFromGitHub {
    owner = "mono";
    repo = "gtk-sharp";
    rev = version;
    sha256 = "1vy6yfwkfv6bb45bzf4g6dayiqkvqqvlr02rsnhd10793hlpqlgg";
  };

  postInstall = ''
    pushd $out/bin
    for f in gapi2-*
    do
      substituteInPlace $f --replace mono ${mono}/bin/mono
    done
    popd
  '';

  nativeBuildInputs = [ pkgconfig autoconf automake libtool which ];

  buildInputs = [
    mono glib pango gtk2 GConf libglade libgnomecanvas
    libgtkhtml libgnomeui libgnomeprint libgnomeprintui gtkhtml libxml2
  ];

  preConfigure = ''
    ./bootstrap-${lib.versions.majorMinor version}
  '';

  dontStrip = true;

  inherit monoDLLFixer;

  passthru = {
    gtk = gtk2;
  };

  meta = with stdenv.lib; {
    description = "Graphical User Interface Toolkit for mono and .Net";
    homepage = https://www.mono-project.com/docs/gui/gtksharp;
    platforms = platforms.linux;
    license = licenses.gpl2;
  };
}
{'fraction_non_alphanumeric': 0.12228163992869875, 'fraction_numerical': 0.027807486631016044, 'mean_word_length': 3.0490620490620493, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5441273', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1064, 'n_words': 231}