<commit_before>{ stdenv, lib, fetchFromGitHub, makeWrapper
, pkgconfig, cmake, libxml2, vala_0_23, intltool, libmx, gnome3, gtk3, gtk_doc
, keybinder3, clutter_gtk, libnotify
, libxkbcommon, xorg, udev
, bashInteractive
}:

with stdenv.lib;

stdenv.mkDerivation {
  name = "finalterm-git-2014-11-15";

  src = fetchFromGitHub {
    owner = "p-e-w";
    repo = "finalterm";
    rev = "39b078b2a96a5c3c9e74f92b1929f383d220ca8b";
    sha256 = "14viln5nabr39lafg1lzf6ydibz1h5d9346drp435ljxc6wsh21i";
  };

  nativeBuildInputs = [ pkgconfig cmake intltool makeWrapper ];
  buildInputs = [
    vala_0_23 gtk3 gnome3.gnome_common gnome3.libgee
    gtk_doc clutter_gtk libmx keybinder3 libxml2 libnotify
    xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence
    libxkbcommon
  ] ++ optionals stdenv.isLinux [ udev ];

  preConfigure = ''
    substituteInPlace data/org.gnome.finalterm.gschema.xml \
      --replace "/bin/bash" "${bashInteractive}/bin/bash"

    cmakeFlagsArray=(
      -DMINIMAL_FLAGS=ON
    )
  '';

  postInstall = ''
    mkdir -p $out/share/gsettings-schemas/$name
    mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/
  '';

  postFixup = ''
    wrapProgram "$out/bin/finalterm" \
      --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
      --prefix GIO_EXTRA_MODULES : "${getLib gnome3.dconf}/lib/gio/modules" \
      --prefix XDG_DATA_DIRS : "${gnome3.defaultIconTheme}/share:${gnome3.gtk.out}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
  '';

  meta = {
    homepage = http://finalterm.org;
    description = "A new breed of terminal emulator";<commit_msg>finalterm: use more recent vala<commit_after>{ stdenv, lib, fetchFromGitHub, makeWrapper
, pkgconfig, cmake, libxml2, vala_0_26, intltool, libmx, gnome3, gtk3, gtk_doc
, keybinder3, clutter_gtk, libnotify
, libxkbcommon, xorg, udev
, bashInteractive
}:

with stdenv.lib;

stdenv.mkDerivation {
  name = "finalterm-git-2014-11-15";

  src = fetchFromGitHub {
    owner = "p-e-w";
    repo = "finalterm";
    rev = "39b078b2a96a5c3c9e74f92b1929f383d220ca8b";
    sha256 = "14viln5nabr39lafg1lzf6ydibz1h5d9346drp435ljxc6wsh21i";
  };

  nativeBuildInputs = [ pkgconfig cmake intltool makeWrapper ];
  buildInputs = [
    vala_0_26 gtk3 gnome3.gnome_common gnome3.libgee
    gtk_doc clutter_gtk libmx keybinder3 libxml2 libnotify
    xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence
    libxkbcommon
  ] ++ optionals stdenv.isLinux [ udev ];

  preConfigure = ''
    substituteInPlace data/org.gnome.finalterm.gschema.xml \
      --replace "/bin/bash" "${bashInteractive}/bin/bash"

    cmakeFlagsArray=(
      -DMINIMAL_FLAGS=ON
    )
  '';

  postInstall = ''
    mkdir -p $out/share/gsettings-schemas/$name
    mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/
  '';

  postFixup = ''
    wrapProgram "$out/bin/finalterm" \
      --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
      --prefix GIO_EXTRA_MODULES : "${getLib gnome3.dconf}/lib/gio/modules" \
      --prefix XDG_DATA_DIRS : "${gnome3.defaultIconTheme}/share:${gnome3.gtk.out}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
  '';

  meta = {
    homepage = http://finalterm.org;
    description = "A new breed of terminal emulator";
{'fraction_non_alphanumeric': 0.12468592964824121, 'fraction_numerical': 0.04773869346733668, 'mean_word_length': 3.7325408618127787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '7579625', 'n_tokens_mistral': 1370, 'n_tokens_neox': 1249, 'n_words': 197}