<commit_before>{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg }:

buildOcaml rec {
  version = "0.8.3";
  name = "astring";

  src = fetchurl {
    url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz";
    sha256 = "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0";
  };

  unpackCmd = "tar -xf $curSrc";

  buildInputs = [ ocaml findlib ocamlbuild topkg ];

  inherit (topkg) buildPhase installPhase;

  meta = {
    homepage = http://erratique.ch/software/astring;
    description = "Alternative String module for OCaml";
    longDescription = ''
      Astring exposes an alternative String module for OCaml. This module tries
      to balance minimality and expressiveness for basic, index-free, string
      processing and provides types and functions for substrings, string sets
      and string maps.
<commit_msg>ocamlPackages.astring: remove spurious dependency to camlp4<commit_after>{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:

stdenv.mkDerivation rec {
  version = "0.8.3";
  name = "ocaml${ocaml.version}-astring-${version}";

  src = fetchurl {
    url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz";
    sha256 = "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0";
  };

  unpackCmd = "tar -xf $curSrc";

  buildInputs = [ ocaml findlib ocamlbuild topkg ];

  inherit (topkg) buildPhase installPhase;

  meta = {
    homepage = http://erratique.ch/software/astring;
    description = "Alternative String module for OCaml";
    longDescription = ''
      Astring exposes an alternative String module for OCaml. This module tries
      to balance minimality and expressiveness for basic, index-free, string
      processing and provides types and functions for substrings, string sets
      and string maps.

{'fraction_non_alphanumeric': 0.09889502762430939, 'fraction_numerical': 0.024861878453038673, 'mean_word_length': 3.868279569892473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6714062', 'n_tokens_mistral': 629, 'n_tokens_neox': 600, 'n_words': 156}