<commit_before>{ stdenv, fetchurl
, bison, boost, cmake, flex
, libedit, mysql, openssl, yajl
}:

stdenv.mkDerivation rec {
  version = "2.4.10";
  name = "icinga2-${version}";

  src = fetchurl {
    url = "https://github.com/Icinga/icinga2/archive/v${version}.tar.gz";
    sha256 = "0pj2y24kgf17106903lnz9gmp5hb3irhafq8sp22qf1wa0q395n2";
  };

  buildInputs = [ bison boost cmake flex libedit openssl yajl ];

  patches = [
    ./check_mysql_slave.patch
  ];

  cmakeFlags = [
    "-DCMAKE_INSTALL_LOCALSTATEDIR=/icinga2"
    "-DCMAKE_INSTALL_SYSCONFDIR=/icinga2/etc" # this will need runtime support
    "-DICINGA2_COMMAND_GROUP=icingacmd"
    "-DICINGA2_GROUP=icinga"
    "-DICINGA2_RUNDIR=/run"
    "-DICINGA2_USER=icinga"
    "-DICINGA2_WITH_PGSQL=OFF"
    "-DMYSQL_INCLUDE_DIR=${mysql.lib}/include/mysql"
    "-DMYSQL_LIB_DIR=${mysql.lib}/lib"
  ];

  # XXX Without DESTDIR it tries to write to /icinga2 and /run:
  installPhase = ''
    rm -rf tmp
    mkdir -p tmp
    make install DESTDIR=$(pwd)/tmp
    mv tmp/$out $out
    mv tmp/icinga2 $out/icinga2
    rm -rf $out/run
    for s in $out/icinga2/etc/icinga2/scripts/* ; do
      substituteInPlace $s --replace /usr/bin/printf printf
    done
  '';
}<commit_msg>nixpkgs 16.09: updated icinga2<commit_after>{ stdenv, fetchurl
, bison, boost, cmake, flex
, libedit, mariadb, openssl, yajl
}:

stdenv.mkDerivation rec {
  version = "2.4.10";
  name = "icinga2-${version}";

  src = fetchurl {
    url = "https://github.com/Icinga/icinga2/archive/v${version}.tar.gz";
    sha256 = "0pj2y24kgf17106903lnz9gmp5hb3irhafq8sp22qf1wa0q395n2";
  };

  buildInputs = [ bison boost cmake flex libedit openssl yajl ];

  patches = [
    ./check_mysql_slave.patch
  ];

  cmakeFlags = [
    "-DCMAKE_INSTALL_LOCALSTATEDIR=/icinga2"
    "-DCMAKE_INSTALL_SYSCONFDIR=/icinga2/etc" # this will need runtime support
    "-DICINGA2_COMMAND_GROUP=icingacmd"
    "-DICINGA2_GROUP=icinga"
    "-DICINGA2_RUNDIR=/run"
    "-DICINGA2_USER=icinga"
    "-DICINGA2_WITH_PGSQL=OFF"
    "-DMYSQL_INCLUDE_DIR=${mariadb.client.dev}/include/mysql"
    "-DMYSQL_LIB_DIR=${mariadb.client.out}/lib"
  ];

  # XXX Without DESTDIR it tries to write to /icinga2 and /run:
  installPhase = ''
    rm -rf tmp
    mkdir -p tmp
    make install DESTDIR=$(pwd)/tmp
    mv tmp/$out $out
    mv tmp/icinga2 $out/icinga2
    rm -rf $out/run
    for s in $out/icinga2/etc/icinga2/scripts/* ; do
      substituteInPlace $s --replace /usr/bin/printf printf
    done
  '';
}
{'fraction_non_alphanumeric': 0.13370922271445831, 'fraction_numerical': 0.038260169150221505, 'mean_word_length': 3.3050259965337956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2209140', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1009, 'n_words': 181}