<commit_before>{ stdenv, fetchgit, cmake, boost, libunwind, mariadb, libmemcached, pcre
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
, libxslt, ocaml
}:

stdenv.mkDerivation rec {
  name    = "hhvm-${version}";
  version = "3.1.0";

  src = fetchgit {
    url    = "https://github.com/facebook/hhvm.git";
    rev    = "71ecbd8fb5e94b2a008387a2b5e9a8df5c6f5c7b";
    sha256 = "1zv3k3bxahwyna2jgicwxm9lxs11jddpc9v41488rmzvfhdmzzkn";
    fetchSubmodules = true;
  };

  buildInputs =
    [ cmake boost libunwind mariadb libmemcached pcre libevent gd curl
      libxml2 icu flex bison openssl zlib php expat libcap oniguruma
      libdwarf libmcrypt tbb gperftools bzip2 openldap readline
      libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml
    ];

  enableParallelBuilding = true;
  dontUseCmakeBuildDir = true;
  dontUseCmakeConfigure = true;
  NIX_LDFLAGS = "-lpam -L${pam}/lib";
  USE_HHVM=1;
  MYSQL_INCLUDE_DIR="${mariadb}/include/mysql";
  MYSQL_DIR=mariadb;
<commit_msg>hhvm: fix build with freetype-2.5<commit_after>{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, mariadb, libmemcached, pcre
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
, libxslt, ocaml, freetype
}:

stdenv.mkDerivation rec {
  name    = "hhvm-${version}";
  version = "3.1.0";

  src = fetchgit {
    url    = "https://github.com/facebook/hhvm.git";
    rev    = "71ecbd8fb5e94b2a008387a2b5e9a8df5c6f5c7b";
    sha256 = "1zv3k3bxahwyna2jgicwxm9lxs11jddpc9v41488rmzvfhdmzzkn";
    fetchSubmodules = true;
  };

  buildInputs =
    [ cmake pkgconfig boost libunwind mariadb libmemcached pcre libevent gd curl
      libxml2 icu flex bison openssl zlib php expat libcap oniguruma
      libdwarf libmcrypt tbb gperftools bzip2 openldap readline
      libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml
    ];

  enableParallelBuilding = true;
  dontUseCmakeBuildDir = true;
  dontUseCmakeConfigure = true;
  NIX_LDFLAGS = "-lpam -L${pam}/lib";
  USE_HHVM=1;
  MYSQL_INCLUDE_DIR="${mariadb}/include/mysql";
  MYSQL_DIR=mariadb;

  # work around broken build system
  NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";

{'fraction_non_alphanumeric': 0.10048231511254019, 'fraction_numerical': 0.03818327974276527, 'mean_word_length': 4.352688172043011, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '813996', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1041, 'n_words': 220}