<commit_before>{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit }:

stdenv.mkDerivation rec {
  name = "ocaml-re-${version}";
  version = "1.7.1";

  src = fetchzip {
    url = "https://github.com/ocaml/ocaml-re/archive/${version}.tar.gz";
    sha256 = "1z2z4fjrpdbl0q50fdxvy3746w1vx6ybxcb0k81hqm1342nylbmw";
  };

  buildInputs = [ ocaml findlib ocamlbuild ounit ];

  configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
  buildPhase = "ocaml setup.ml -build";
  doCheck = true;
  checkPhase = "ocaml setup.ml -test";
  installPhase = "ocaml setup.ml -install";

  createFindlibDestdir = true;

  meta = {
    homepage = https://github.com/ocaml/ocaml-re;
    platforms = ocaml.meta.platforms or [];
    description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
    license = stdenv.lib.licenses.lgpl2;
    maintainers = with stdenv.lib.maintainers; [ vbgl ];
  };
}<commit_msg>ocamlPackages.re: disable tests for OCaml ≥ 4.06<commit_after>{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit }:

stdenv.mkDerivation rec {
  name = "ocaml-re-${version}";
  version = "1.7.1";

  src = fetchzip {
    url = "https://github.com/ocaml/ocaml-re/archive/${version}.tar.gz";
    sha256 = "1z2z4fjrpdbl0q50fdxvy3746w1vx6ybxcb0k81hqm1342nylbmw";
  };

  buildInputs = [ ocaml findlib ocamlbuild ounit ];

  configurePhase = "ocaml setup.ml -configure --prefix $out"
  + stdenv.lib.optionalString doCheck " --enable-tests";
  buildPhase = "ocaml setup.ml -build";
  doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06";
  checkPhase = "ocaml setup.ml -test";
  installPhase = "ocaml setup.ml -install";

  createFindlibDestdir = true;

  meta = {
    homepage = https://github.com/ocaml/ocaml-re;
    platforms = ocaml.meta.platforms or [];
    description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
    license = stdenv.lib.licenses.lgpl2;
    maintainers = with stdenv.lib.maintainers; [ vbgl ];
  };
}
{'fraction_non_alphanumeric': 0.1375186846038864, 'fraction_numerical': 0.028898854010961636, 'mean_word_length': 3.702576112412178, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3945381', 'n_tokens_mistral': 797, 'n_tokens_neox': 757, 'n_words': 152}