<commit_before>{ lib
, stdenv
, fetchFromGitHub
, which
, autoconf
, automake
, libtool
, libpcap
, json_c
, pkg-config }:

stdenv.mkDerivation rec {
  pname = "ndpi";
  version = "4.0";

  src = fetchFromGitHub {
    owner = "ntop";
    repo = "nDPI";
    rev = version;
    sha256 = "0snzvlracc6s7r2pgdn0jqcc7nxjxzcivsa579h90g5ibhhplv5x";
  };

  configureScript = "./autogen.sh";

  nativeBuildInputs = [ which autoconf automake libtool pkg-config ];
  buildInputs = [
    libpcap
    json_c
  ];

  meta = with lib; {
    description = "A library for deep-packet inspection";
    longDescription = ''
      nDPI is a library for deep-packet inspection based on OpenDPI.
    '';
    homepage = "https://www.ntop.org/products/deep-packet-inspection/ndpi/";
    license = with licenses; lgpl3;
    maintainers = with maintainers; [ takikawa ];
    platforms = with platforms; unix;
  };
}<commit_msg>ndpi: 4.0 -> 4.2<commit_after>{ lib
, stdenv
, fetchFromGitHub
, which
, autoconf
, automake
, libtool
, libpcap
, json_c
, pkg-config }:

stdenv.mkDerivation rec {
  pname = "ndpi";
  version = "4.2";

  src = fetchFromGitHub {
    owner = "ntop";
    repo = "nDPI";
    rev = version;
    sha256 = "sha256-ZWWuyPGl+hbrfXdtPvCBqMReuJ4FiGx+qiI7qCz6wtQ=";
  };

  configureScript = "./autogen.sh";

  nativeBuildInputs = [ which autoconf automake libtool pkg-config ];
  buildInputs = [
    libpcap
    json_c
  ];

  meta = with lib; {
    description = "A library for deep-packet inspection";
    longDescription = ''
      nDPI is a library for deep-packet inspection based on OpenDPI.
    '';
    homepage = "https://www.ntop.org/products/deep-packet-inspection/ndpi/";
    license = with licenses; lgpl3;
    maintainers = with maintainers; [ takikawa ];
    platforms = with platforms; unix;
  };
}
{'fraction_non_alphanumeric': 0.12250554323725056, 'fraction_numerical': 0.019401330376940133, 'mean_word_length': 3.1210045662100456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '2356481', 'n_tokens_mistral': 695, 'n_tokens_neox': 668, 'n_words': 146}