<commit_before>{ stdenv, fetchFromGitHub, cmake, pkgconfig, qt4, boost, bzip2, libX11
, fetchpatch, libiconv, pcre-cpp, libidn, lua5, miniupnpc, aspell, gettext }:

stdenv.mkDerivation rec {
  name = "eiskaltdcpp-${version}";
  version = "2.2.10";

  src = fetchFromGitHub {
    owner = "eiskaltdcpp";
    repo = "eiskaltdcpp";
    rev = "v${version}";
    sha256 = "1mqz0g69njmlghcra3izarjxbxi1jrhiwn4ww94b8jv8xb9cv682";
  };

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ qt4 boost bzip2 libX11 pcre-cpp libidn lua5 miniupnpc aspell gettext ]
    ++ stdenv.lib.optional stdenv.isDarwin libiconv;

  patches = [
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b7b56bd7060b426b1f1bfded392ae6853644e2e.patch";
      sha256 = "1rqjdsvirn3ks9w9qn893fb73mz84xm04wl13fvsvj8p42i5cjas";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/bb9eb364a943fe2a67b3ea52ec6a3f9e911f07dc.patch";
      sha256 = "1hjhf9a9j4z8v24g5qh5mcg3n0540lbn85y7kvxsh3khc5v3cywx";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/ef4426f1f9a8255e335b0862234e6cc28befef5e.patch";
      sha256 = "13j018c499n4b5as2n39ws64yj0cf4fskxbqab309vmnjkirxv6x";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/a9c136c8707280d0eeb66be6b289d9718287c55c.patch";
      sha256 = "0w8v4mbrzk7pmzc475ff96mzzwlh8a0p62kk7p829m5yqdwj4sc9";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b9c502ff5c98856d4f8fdb7ed3c6ef34448bfb7.patch";
      sha256 = "0fjwaq0wd9a164k5ysdjy89hx0ixnxc6q7cvyn1ba28snm0pgxb8";
    })
  ];

  cmakeFlags = ''
    -DUSE_ASPELL=ON<commit_msg>eiskaltdcpp: 2.2.9 -> 2.2.10, add upstream openssl patches<commit_after>{ stdenv, fetchFromGitHub, cmake, pkgconfig, qt4, boost, bzip2, libX11
, fetchpatch, libiconv, pcre-cpp, libidn, lua5, miniupnpc, aspell, gettext }:

stdenv.mkDerivation rec {
  name = "eiskaltdcpp-${version}";
  version = "2.2.10";

  src = fetchFromGitHub {
    owner = "eiskaltdcpp";
    repo = "eiskaltdcpp";
    rev = "v${version}";
    sha256 = "1mqz0g69njmlghcra3izarjxbxi1jrhiwn4ww94b8jv8xb9cv682";
  };

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ qt4 boost bzip2 libX11 pcre-cpp libidn lua5 miniupnpc aspell gettext ]
    ++ stdenv.lib.optional stdenv.isDarwin libiconv;

  patches = [
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b7b56bd7060b426b1f1bfded392ae6853644e2e.patch";
      sha256 = "1rqjdsvirn3ks9w9qn893fb73mz84xm04wl13fvsvj8p42i5cjas";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/bb9eb364a943fe2a67b3ea52ec6a3f9e911f07dc.patch";
      sha256 = "1hjhf9a9j4z8v24g5qh5mcg3n0540lbn85y7kvxsh3khc5v3cywx";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/ef4426f1f9a8255e335b0862234e6cc28befef5e.patch";
      sha256 = "13j018c499n4b5as2n39ws64yj0cf4fskxbqab309vmnjkirxv6x";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/a9c136c8707280d0eeb66be6b289d9718287c55c.patch";
      sha256 = "0w8v4mbrzk7pmzc475ff96mzzwlh8a0p62kk7p829m5yqdwj4sc9";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b9c502ff5c98856d4f8fdb7ed3c6ef34448bfb7.patch";
      sha256 = "0fjwaq0wd9a164k5ysdjy89hx0ixnxc6q7cvyn1ba28snm0pgxb8";
    })
  ];

  patches = [
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b7b56bd7060b426b1f1bfded392ae6853644e2e.patch";
      sha256 = "1rqjdsvirn3ks9w9qn893fb73mz84xm04wl13fvsvj8p42i5cjas";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/bb9eb364a943fe2a67b3ea52ec6a3f9e911f07dc.patch";
      sha256 = "1hjhf9a9j4z8v24g5qh5mcg3n0540lbn85y7kvxsh3khc5v3cywx";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/ef4426f1f9a8255e335b0862234e6cc28befef5e.patch";
      sha256 = "13j018c499n4b5as2n39ws64yj0cf4fskxbqab309vmnjkirxv6x";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/a9c136c8707280d0eeb66be6b289d9718287c55c.patch";
      sha256 = "0w8v4mbrzk7pmzc475ff96mzzwlh8a0p62kk7p829m5yqdwj4sc9";
    })
    (fetchpatch {
      url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b9c502ff5c98856d4f8fdb7ed3c6ef34448bfb7.patch";
      sha256 = "0fjwaq0wd9a164k5ysdjy89hx0ixnxc6q7cvyn1ba28snm0pgxb8";
    })
  ];

  cmakeFlags = ''
    -DUSE_ASPELL=ON
{'fraction_non_alphanumeric': 0.10876730388925511, 'fraction_numerical': 0.16721599648428917, 'mean_word_length': 4.39976275207592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 15, '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': '3311720', 'n_tokens_mistral': 2509, 'n_tokens_neox': 2182, 'n_words': 187}