<commit_before>{ lib, stdenv, fetchurl, zlib }:

stdenv.mkDerivation rec {
  name = "kyotocabinet-1.2.76";

  src = fetchurl {
    url = "http://fallabs.com/kyotocabinet/pkg/${name}.tar.gz";
    sha256 = "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1";
  };

  prePatch = lib.optionalString stdenv.isDarwin ''
    substituteInPlace kccommon.h \
      --replace tr1/unordered_map unordered_map \
      --replace tr1/unordered_set unordered_set \
      --replace tr1::hash std::hash \
      --replace tr1::unordered_map std::unordered_map \
      --replace tr1::unordered_set std::unordered_set

    substituteInPlace lab/kcdict/Makefile --replace stdc++ c++
    substituteInPlace configure \
        --replace /usr/local/bin:/usr/local/sbin: "" \
        --replace /usr/bin:/usr/sbin: "" \
        --replace /bin:/sbin: "" \
        --replace stdc++ c++
  '';

  patches = [(fetchurl {
    name = "gcc6.patch";
    url = "https://src.fedoraproject.org/rpms/kyotocabinet/raw/master/f/kyotocabinet-1.2.76-gcc6.patch";
    sha256 = "1h5k38mkiq7lz8nd2gbn7yvimcz49g3z7phn1cr560bzjih8rz23";
  })];

  buildInputs = [ zlib ];

  meta = with lib; {
    homepage = "http://fallabs.com/kyotocabinet";
    description = "A library of routines for managing a database";
    license = licenses.gpl3;
    platforms = platforms.all;
  };
}<commit_msg>kyotocabinet: 1.2.76 -> 1.2.79 (#126836)<commit_after>{ lib, stdenv, fetchurl, zlib }:

stdenv.mkDerivation rec {
  pname = "kyotocabinet";
  version = "1.2.79";

  src = fetchurl {
    url = "https://dbmx.net/kyotocabinet/pkg/kyotocabinet-${version}.tar.gz";
    sha256 = "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7";
  };

  prePatch = lib.optionalString stdenv.isDarwin ''
    substituteInPlace kccommon.h \
      --replace tr1/unordered_map unordered_map \
      --replace tr1/unordered_set unordered_set \
      --replace tr1::hash std::hash \
      --replace tr1::unordered_map std::unordered_map \
      --replace tr1::unordered_set std::unordered_set

    substituteInPlace lab/kcdict/Makefile --replace stdc++ c++
    substituteInPlace configure \
        --replace /usr/local/bin:/usr/local/sbin: "" \
        --replace /usr/bin:/usr/sbin: "" \
        --replace /bin:/sbin: "" \
        --replace stdc++ c++
  '';

  buildInputs = [ zlib ];

  meta = with lib; {
    homepage = "https://dbmx.net/kyotocabinet";
    description = "A library of routines for managing a database";
    license = licenses.gpl3Plus;
    platforms = platforms.all;
  };
}
{'fraction_non_alphanumeric': 0.14536041417761847, 'fraction_numerical': 0.03942652329749104, 'mean_word_length': 2.912772585669782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 3, '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': '6883296', 'n_tokens_mistral': 998, 'n_tokens_neox': 949, 'n_words': 155}