2015-03-18 01:32:10 +01:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached, pcre
|
2014-06-10 13:12:12 +02:00
|
|
|
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
|
2015-06-27 02:19:12 +02:00
|
|
|
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
|
2014-06-10 13:12:12 +02:00
|
|
|
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
|
2015-03-18 01:32:10 +01:00
|
|
|
, libxslt, ocaml, freetype, gdb, git, perl, mariadb, gmp, libyaml, libedit
|
|
|
|
, libvpx, imagemagick, fribidi
|
2014-06-10 13:12:12 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hhvm-${version}";
|
2015-03-18 01:32:10 +01:00
|
|
|
version = "3.6.0";
|
2014-06-10 13:12:12 +02:00
|
|
|
|
2014-12-12 17:05:08 +01:00
|
|
|
# use git version since we need submodules
|
2014-06-10 13:12:12 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/facebook/hhvm.git";
|
2015-03-18 01:32:10 +01:00
|
|
|
rev = "6ef13f20da20993dc8bab9eb103f73568618d3e8";
|
|
|
|
sha256 = "29a2d4b56cfd348b199d8f90b4e4b07de85dfb2ef1538479cd1e84f5bc1fbf96";
|
2014-06-10 13:12:12 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs =
|
2015-03-18 01:32:10 +01:00
|
|
|
[ cmake pkgconfig boost libunwind mariadb libmemcached pcre gdb git perl
|
2014-09-19 19:56:08 +02:00
|
|
|
libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
|
|
|
|
oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
|
2015-06-27 02:19:12 +02:00
|
|
|
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml libkrb5
|
2015-03-18 01:32:10 +01:00
|
|
|
gmp libyaml libedit libvpx imagemagick fribidi
|
2014-06-10 13:12:12 +02:00
|
|
|
];
|
|
|
|
|
2015-04-04 06:37:51 +02:00
|
|
|
enableParallelBuilding = false;
|
2014-06-10 13:12:12 +02:00
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
NIX_LDFLAGS = "-lpam -L${pam}/lib";
|
|
|
|
MYSQL_INCLUDE_DIR="${mariadb}/include/mysql";
|
|
|
|
MYSQL_DIR=mariadb;
|
|
|
|
|
2014-06-26 21:44:39 +02:00
|
|
|
# work around broken build system
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
|
|
|
|
|
2014-12-12 17:05:08 +01:00
|
|
|
prePatch = ''
|
2014-06-10 13:12:12 +02:00
|
|
|
substituteInPlace hphp/util/generate-buildinfo.sh \
|
|
|
|
--replace /bin/bash ${stdenv.shell}
|
2014-07-20 02:44:08 +02:00
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace "/usr/bin/env bash" ${stdenv.shell}
|
2015-09-03 22:10:03 +02:00
|
|
|
sed '1i#include <vector>' \
|
|
|
|
-i ./third-party/mcrouter/mcrouter/lib/fibers/TimeoutController.h
|
2014-06-10 13:12:12 +02:00
|
|
|
'';
|
|
|
|
|
2015-03-18 01:32:10 +01:00
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
2014-06-10 13:12:12 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "High-performance JIT compiler for PHP/Hack";
|
|
|
|
homepage = "http://hhvm.com";
|
|
|
|
license = "PHP/Zend";
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|