<commit_before>{ stdenv, fetchFromGitHub, cmake }:

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

  version = "0.0.5";

  src = fetchFromGitHub {
    owner  = "BYVoid";
    repo   = "uchardet";
    rev    = "v${version}";
    sha256 = "0rkym5bhq3hn7623fy0fggw0qaghha71k8bi41ywqd2lchpahrrm";
  };

  buildInputs = [ cmake ];

  doCheck = false; # fails all the tests (ctest)

  meta = with stdenv.lib; {
    description = "Mozilla's Universal Charset Detector C/C++ API";
    homepage    = https://www.byvoid.com/zht/project/uchardet;
    license     = licenses.mpl11;
    maintainers = with maintainers; [ cstrahan ];
    platforms = with platforms; unix;
  };
}<commit_msg>libuchardet: 0.0.5 → 0.0.6<commit_after>{ stdenv, fetchurl, cmake }:

stdenv.mkDerivation rec {
  pname = "uchardet";
  version = "0.0.6";

  outputs = [ "bin" "out" "man" "dev" ];

  src = fetchurl {
    url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.xz";
    sha256 = "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3";
  };

  buildInputs = [ cmake ];

  cmakeFlags = [
    "-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
    # TODO: move the following to CMake setup hook
    "-DCMAKE_INSTALL_BINDIR=${placeholder "bin"}/bin"
    "-DCMAKE_INSTALL_MANDIR=${placeholder "man"}/share/man"
  ];

  doCheck = true;

  meta = with stdenv.lib; {
    description = "Mozilla's Universal Charset Detector C/C++ API";
    homepage = https://www.freedesktop.org/wiki/Software/uchardet/;
    license = licenses.mpl11;
    maintainers = with maintainers; [ cstrahan ];
    platforms = with platforms; unix;
  };
}
{'fraction_non_alphanumeric': 0.1459227467811159, 'fraction_numerical': 0.03372164316370325, 'mean_word_length': 3.4347826086956523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 3, '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': '5006054', 'n_tokens_mistral': 669, 'n_tokens_neox': 627, 'n_words': 117}