<commit_before>{ stdenv, lib, fetchurl
, coq, ocaml, findlib, menhir
, tools ? stdenv.cc
}:

assert lib.versionAtLeast ocaml.version "4.02";

stdenv.mkDerivation rec {
  name    = "compcert-${version}";
  version = "2.7.1";

  src = fetchurl {
    url    = "http://compcert.inria.fr/release/${name}.tgz";
    sha256 = "1vhbs1fmr9x2imqyd6yfvkbz763jhjfm9wk4nizf9rn1cvxrjqa4";
  };

  buildInputs = [ coq ocaml findlib menhir ];

  enableParallelBuilding = true;

  configurePhase = ''
    substituteInPlace ./configure --replace pl2 pl3
    substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
    ./configure -prefix $out -toolprefix ${tools}/bin/ '' +
    (if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");

  installTargets = "documentation install";

  postInstall = ''
    mkdir -p $lib/share/doc/compcert
    mv doc/html $lib/share/doc/compcert/
    mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
    mv backend cfrontend common cparser driver flocq ia32 lib \
      $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
  '';
<commit_msg>compcert: adding clightgen to the build<commit_after>{ stdenv, lib, fetchurl
, coq, ocaml, findlib, menhir
, tools ? stdenv.cc
}:

assert lib.versionAtLeast ocaml.version "4.02";

stdenv.mkDerivation rec {
  name    = "compcert-${version}";
  version = "2.7.1";

  src = fetchurl {
    url    = "http://compcert.inria.fr/release/${name}.tgz";
    sha256 = "1vhbs1fmr9x2imqyd6yfvkbz763jhjfm9wk4nizf9rn1cvxrjqa4";
  };

  buildInputs = [ coq ocaml findlib menhir ];

  enableParallelBuilding = true;

  configurePhase = ''
    substituteInPlace ./configure --replace pl2 pl3
    substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
    ./configure -clightgen -prefix $out -toolprefix ${tools}/bin/ '' +
    (if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");

  installTargets = "documentation install";

  postInstall = ''
    mkdir -p $lib/share/doc/compcert
    mv doc/html $lib/share/doc/compcert/
    mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
    mv backend cfrontend common cparser driver flocq ia32 lib \
      $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
  '';

{'fraction_non_alphanumeric': 0.14240648940964398, 'fraction_numerical': 0.027039206849932402, 'mean_word_length': 3.475806451612903, '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': '970717', 'n_tokens_mistral': 872, 'n_tokens_neox': 831, 'n_words': 162}