Add HHVM packages, replacing old hiphop-php expr

Signed-off-by: Austin Seipp <aseipp@pobox.com>

+61
+59
pkgs/development/compilers/hhvm/default.nix
··· 1 + { stdenv, fetchgit, cmake, boost, libunwind, mariadb, libmemcached, pcre 2 + , libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c 3 + , expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog 4 + , bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng 5 + , libxslt, ocaml 6 + }: 7 + 8 + stdenv.mkDerivation rec { 9 + name = "hhvm-${version}"; 10 + version = "3.1.0"; 11 + 12 + src = fetchgit { 13 + url = "https://github.com/facebook/hhvm.git"; 14 + rev = "71ecbd8fb5e94b2a008387a2b5e9a8df5c6f5c7b"; 15 + sha256 = "1zv3k3bxahwyna2jgicwxm9lxs11jddpc9v41488rmzvfhdmzzkn"; 16 + fetchSubmodules = true; 17 + }; 18 + 19 + buildInputs = 20 + [ cmake boost libunwind mariadb libmemcached pcre libevent gd curl 21 + libxml2 icu flex bison openssl zlib php expat libcap oniguruma 22 + libdwarf libmcrypt tbb gperftools bzip2 openldap readline 23 + libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml 24 + ]; 25 + 26 + enableParallelBuilding = true; 27 + dontUseCmakeBuildDir = true; 28 + dontUseCmakeConfigure = true; 29 + NIX_LDFLAGS = "-lpam -L${pam}/lib"; 30 + USE_HHVM=1; 31 + MYSQL_INCLUDE_DIR="${mariadb}/include/mysql"; 32 + MYSQL_DIR=mariadb; 33 + 34 + patchPhase = '' 35 + substituteInPlace hphp/util/generate-buildinfo.sh \ 36 + --replace /bin/bash ${stdenv.shell} 37 + ''; 38 + installPhase = '' 39 + mkdir -p $out/bin $out/lib 40 + mv hphp/hhvm/hhvm $out/bin 41 + mv hphp/hack/bin/hh_server $out/bin 42 + mv hphp/hack/bin/hh_client $out/bin 43 + mv hphp/hack/hhi $out/lib/hack-hhi 44 + 45 + cat > $out/bin/hhvm-hhi-copy <<EOF 46 + #!${stdenv.shell} 47 + cp -R $out/lib/hack-hhi \$1 48 + EOF 49 + chmod +x $out/bin/hhvm-hhi-copy 50 + ''; 51 + 52 + meta = { 53 + description = "High-performance JIT compiler for PHP/Hack"; 54 + homepage = "http://hhvm.com"; 55 + license = "PHP/Zend"; 56 + platforms = [ "x86_64-linux" ]; 57 + maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 58 + }; 59 + }
+2
pkgs/top-level/all-packages.nix
··· 2939 2939 2940 2940 haxe = callPackage ../development/compilers/haxe { }; 2941 2941 2942 + hhvm = callPackage ../development/compilers/hhvm { }; 2943 + 2942 2944 hiphopvm = callPackage ../development/interpreters/hiphopvm { 2943 2945 libevent = libevent14; 2944 2946 boost = boost149;