<commit_before>{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal,
  buildBytecode ? true,
  buildNative ? true,
  installExamples ? true,
  installEmacsMode ? true }:

let inherit (stdenv.lib) getVersion versionAtLeast
                         optionals optionalString; in

assert versionAtLeast (getVersion ocaml) "3.07";
assert versionAtLeast (getVersion dypgen) "20080925";
assert versionAtLeast (getVersion bolt) "1.4";

assert buildBytecode || buildNative;

stdenv.mkDerivation {

  name = "acgtk-1.1";

  src = fetchurl {
    url = "http://www.loria.fr/equipes/calligramme/acg/software/acg-1.1-20140905.tar.gz";
    sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6";
  };

  buildInputs = [ ocaml findlib dypgen bolt ansiterminal ];

  patches = [ ./install-emacs-to-site-lisp.patch
              ./use-nix-ocaml-byteflags.patch ];<commit_msg>acgtk: fix build with OCaml 4.02<commit_after>{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal, camlp4,
  buildBytecode ? true,
  buildNative ? true,
  installExamples ? true,
  installEmacsMode ? true }:

let inherit (stdenv.lib) getVersion versionAtLeast
                         optionals optionalString; in

assert versionAtLeast (getVersion ocaml) "3.07";
assert versionAtLeast (getVersion dypgen) "20080925";
assert versionAtLeast (getVersion bolt) "1.4";

assert buildBytecode || buildNative;

stdenv.mkDerivation {

  name = "acgtk-1.1";

  src = fetchurl {
    url = "http://www.loria.fr/equipes/calligramme/acg/software/acg-1.1-20140905.tar.gz";
    sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6";
  };

  buildInputs = [ ocaml findlib dypgen bolt ansiterminal camlp4 ];

  patches = [ ./install-emacs-to-site-lisp.patch
              ./use-nix-ocaml-byteflags.patch ];

  postPatch = stdenv.lib.optionalString (camlp4 != null) ''
    substituteInPlace src/Makefile.master.in \
      --replace "+camlp4" "${camlp4}/lib/ocaml/${getVersion ocaml}/site-lib/camlp4/"
  '';
{'fraction_non_alphanumeric': 0.12040302267002519, 'fraction_numerical': 0.04685138539042821, 'mean_word_length': 3.706161137440758, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7242845', 'n_tokens_mistral': 798, 'n_tokens_neox': 746, 'n_words': 137}