2012-12-02 14:24:28 +00:00
|
|
|
{ stdenv, fetchurl, fetchgit, cmake, boost, libunwind, mysql, libmemcached, pcre
|
|
|
|
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
|
2014-01-24 18:23:23 +00:00
|
|
|
, expat, libcap, oniguruma, libdwarf, libmcrypt, inteltbb, gperftools, glog
|
|
|
|
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
|
2012-12-02 14:24:28 +00:00
|
|
|
}:
|
|
|
|
assert stdenv.system == "x86_64-linux";
|
|
|
|
let
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/facebook/hiphop-php.git";
|
2014-01-24 18:23:23 +00:00
|
|
|
rev = "1e23dec9f0b1ce8aaa5833d0527a369c8e254ffd";
|
|
|
|
sha256 = "0fblwgq8c3hmamw0m5d1mn8qhyqf14v2zf62cgrkvmbiz6jlrbr6";
|
2012-12-02 14:24:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
libxml2_280 = stdenv.lib.overrideDerivation libxml2 (args: rec {
|
|
|
|
name = "libxml2-2.8.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://xmlsoft.org/libxml2/${name}.tar.gz";
|
|
|
|
sha256 = "0ak2mjwvanz91nwxf1kkgbhrkm85vhhkpj7ymz8r6lb84bix1qpj";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [];
|
|
|
|
});
|
|
|
|
|
2014-01-24 18:23:23 +00:00
|
|
|
fbPatch = "${src}/hphp/third_party/libevent-1.4.14.fb-changes.diff";
|
|
|
|
|
2012-12-02 14:24:28 +00:00
|
|
|
libeventFB = stdenv.lib.overrideDerivation libevent (args: { patches = [fbPatch]; });
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2014-01-24 18:23:23 +00:00
|
|
|
name = "hiphop-php-1e23dec9f0";
|
2012-12-02 14:24:28 +00:00
|
|
|
inherit src;
|
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
USE_HHVM=1;
|
|
|
|
preConfigure = ''
|
|
|
|
export HPHP_LIB=$PWD/bin
|
|
|
|
export TBB_INSTALL_DIR=${inteltbb}
|
|
|
|
export TBB_ARCH_PLATFORM="intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
|
2014-01-24 18:23:23 +00:00
|
|
|
sed 's=/bin/bash=/${stdenv.shell}=g' -i hphp/util/generate-buildinfo.sh
|
2012-12-02 14:24:28 +00:00
|
|
|
'';
|
|
|
|
NIX_LDFLAGS = "-lpam -L${pam}/lib";
|
2014-01-24 18:23:23 +00:00
|
|
|
MYSQL_INCLUDE_DIR="${mysql}/include/mysql";
|
2012-12-02 14:24:28 +00:00
|
|
|
MYSQL_DIR=mysql;
|
|
|
|
buildInputs = [
|
2014-01-24 18:23:23 +00:00
|
|
|
cmake boost libunwind mysql libmemcached pcre libeventFB gd curl
|
2012-12-02 14:24:28 +00:00
|
|
|
libxml2_280 icu flex bison openssl zlib php expat libcap oniguruma
|
2013-01-28 12:48:35 +00:00
|
|
|
libdwarf libmcrypt inteltbb gperftools bzip2 openldap readline
|
2014-01-24 18:23:23 +00:00
|
|
|
libelf uwimap binutils cyrus_sasl pam glog libpng
|
2012-12-02 14:24:28 +00:00
|
|
|
];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2014-01-24 18:23:23 +00:00
|
|
|
cp hphp/hhvm/hhvm $out/bin
|
2012-12-02 14:24:28 +00:00
|
|
|
'';
|
|
|
|
patches = [./tbb.patch];
|
|
|
|
|
|
|
|
meta = {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "High performance PHP toolchain";
|
2012-12-02 14:24:28 +00:00
|
|
|
homepage = https://github.com/facebook/hiphop-php;
|
2012-12-02 19:49:59 +00:00
|
|
|
platforms = ["x86_64-linux"];
|
2012-12-02 14:24:28 +00:00
|
|
|
};
|
|
|
|
}
|