<commit_before>{ stdenv, fetchurl, intltool, pkgconfig, readline, openldap, cyrus_sasl, libupnp
, zlib, libxml2, gtk2, libnotify, speex, ffmpeg, libX11, libsoup, udev
, ortp, mediastreamer, sqlite, belle-sip, libosip, libexosip
, mediastreamer-openh264, bctoolbox, makeWrapper, fetchFromGitHub, cmake
, libmatroska, bcunit, doxygen, gdk_pixbuf, glib, cairo, pango, polarssl
}:

stdenv.mkDerivation rec {
  baseName = "linphone";
  version = "3.10.2";
  name = "${baseName}-${version}";

  src = fetchFromGitHub {
    owner = "BelledonneCommunications";
    repo = "${baseName}";
    rev = "${version}";
    sha256 = "053gad4amdbq5za8f2n9j5q59nkky0w098zbsa3dvpcqvv7ar16p";
  };

  buildInputs = [
    readline openldap cyrus_sasl libupnp zlib libxml2 gtk2 libnotify speex ffmpeg libX11
    polarssl libsoup udev ortp mediastreamer sqlite belle-sip libosip libexosip
    bctoolbox libmatroska bcunit gdk_pixbuf glib cairo pango
  ];

  nativeBuildInputs = [ intltool pkgconfig makeWrapper cmake doxygen ];

  NIX_CFLAGS_COMPILE = " -Wno-error -I${glib.dev}/include/glib-2.0
    -I${glib.out}/lib/glib-2.0/include -I${gtk2.dev}/include/gtk-2.0/
    -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0
    -I${gtk2}/lib/gtk-2.0/include
    -DLIBLINPHONE_GIT_VERSION=\"v${version}\"
    ";

  postInstall = ''
    for i in $(cd $out/bin && ls); do
      wrapProgram $out/bin/$i --set MEDIASTREAMER_PLUGINS_DIR ${mediastreamer-openh264}/lib/mediastreamer/plugins
    done<commit_msg>linphone: 3.10.2 -> 3.12.0<commit_after>{ stdenv, fetchurl, intltool, pkgconfig, readline, openldap, cyrus_sasl, libupnp
, zlib, libxml2, gtk2, libnotify, speex, ffmpeg, libX11, libsoup, udev
, ortp, mediastreamer, sqlite, belle-sip, libosip, libexosip, bzrtp
, mediastreamer-openh264, bctoolbox, makeWrapper, fetchFromGitHub, cmake
, libmatroska, bcunit, doxygen, gdk_pixbuf, glib, cairo, pango, polarssl
, python, graphviz, belcard
}:

stdenv.mkDerivation rec {
  baseName = "linphone";
  version = "3.12.0";
  name = "${baseName}-${version}";

  src = fetchFromGitHub {
    owner = "BelledonneCommunications";
    repo = "${baseName}";
    rev = "${version}";
    sha256 = "0az2ywrpx11sqfb4s4r2v726avcjf4k15bvrqj7xvhz7hdndmh0j";
  };

  buildInputs = [
    readline openldap cyrus_sasl libupnp zlib libxml2 gtk2 libnotify speex ffmpeg libX11
    polarssl libsoup udev ortp mediastreamer sqlite belle-sip libosip libexosip
    bctoolbox libmatroska bcunit gdk_pixbuf glib cairo pango bzrtp belcard
  ];

  nativeBuildInputs = [
    intltool pkgconfig makeWrapper cmake doxygen graphviz
    (python.withPackages (ps: [ ps.pystache ps.six ]))
  ];

  NIX_CFLAGS_COMPILE = " -Wno-error -I${glib.dev}/include/glib-2.0
    -I${glib.out}/lib/glib-2.0/include -I${gtk2.dev}/include/gtk-2.0/
    -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0
    -I${gtk2}/lib/gtk-2.0/include
    -DLIBLINPHONE_GIT_VERSION=\"v${version}\"
    ";

  postInstall = ''
    for i in $(cd $out/bin && ls); do
      wrapProgram $out/bin/$i --set MEDIASTREAMER_PLUGINS_DIR ${mediastreamer-openh264}/lib/mediastreamer/plugins
    done
{'fraction_non_alphanumeric': 0.1316806181584031, 'fraction_numerical': 0.035093367675466836, 'mean_word_length': 4.144039735099338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5629572', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1258, 'n_words': 236}