<commit_before>{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gmp, perl }:

assert stdenv.lib.versionAtLeast ocaml.version "3.12.1";

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

  src = fetchurl {
    url = http://forge.ocamlcore.org/frs/download.php/1471/zarith-1.3.tgz;
    sha256 = "1mx3nxcn5h33qhx4gbg0hgvvydwlwdvdhqcnvfwnmf9jy3b8frll";
  };

  buildInputs = [ ocaml findlib pkgconfig perl ];
  propagatedBuildInputs = [ gmp ];

  patchPhase = ''
    substituteInPlace ./z_pp.pl --replace '/usr/bin/perl' '${perl}/bin/perl'
  '';
  configurePhase = ''
    ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
  '';
  preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib";

  meta = with stdenv.lib; {
    description = "Fast, arbitrary precision OCaml integers";
    homepage    = "http://forge.ocamlcore.org/projects/zarith";
    license     = licenses.lgpl2;
    platforms   = ocaml.meta.platforms or [];
    maintainers = with maintainers; [ thoughtpolice vbgl ];
  };
}
<commit_msg>ocamlPackage.zarith: 1.3 -> 1.4.1<commit_after>{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gmp, perl }:

assert stdenv.lib.versionAtLeast ocaml.version "3.12.1";

let param =
  if stdenv.lib.versionAtLeast ocaml.version "4.02"
  then {
    version = "1.4.1";
    url = http://forge.ocamlcore.org/frs/download.php/1574/zarith-1.4.1.tgz;
    sha256 = "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3";
  } else {
    version = "1.3";
    url = http://forge.ocamlcore.org/frs/download.php/1471/zarith-1.3.tgz;
    sha256 = "1mx3nxcn5h33qhx4gbg0hgvvydwlwdvdhqcnvfwnmf9jy3b8frll";
  };
in

stdenv.mkDerivation rec {
  name = "zarith-${version}";
  inherit (param) version;

  src = fetchurl {
    inherit (param) url sha256;
  };

  buildInputs = [ ocaml findlib pkgconfig perl ];
  propagatedBuildInputs = [ gmp ];

  patchPhase = ''
    substituteInPlace ./z_pp.pl --replace '/usr/bin/perl' '${perl}/bin/perl'
  '';
  configurePhase = ''
    ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
  '';
  preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib";

  meta = with stdenv.lib; {
    description = "Fast, arbitrary precision OCaml integers";
    homepage    = "http://forge.ocamlcore.org/projects/zarith";
    license     = licenses.lgpl2;
    platforms   = ocaml.meta.platforms or [];
    maintainers = with maintainers; [ thoughtpolice vbgl ];
  };
}

{'fraction_non_alphanumeric': 0.1524866420057542, 'fraction_numerical': 0.036991368680641186, 'mean_word_length': 3.4014466546112114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5520065', 'n_tokens_mistral': 1013, 'n_tokens_neox': 965, 'n_words': 156}