forked from mirrors/nixpkgs
59 lines
2.1 KiB
Nix
59 lines
2.1 KiB
Nix
{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached, pcre
|
|
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
|
|
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
|
|
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
|
|
, libxslt, ocaml, freetype, gdb, git, perl, mariadb, gmp, libyaml, libedit
|
|
, libvpx, imagemagick, fribidi, gperf
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "hhvm-${version}";
|
|
version = "3.12.1";
|
|
|
|
# use git version since we need submodules
|
|
src = fetchgit {
|
|
url = "https://github.com/facebook/hhvm.git";
|
|
rev = "f516f1bb9046218f89885a220354c19dda6d8f4d";
|
|
sha256 = "0sv856ran15rvnrj4dk0a5jirip5w4336a0aycv9wh77wm4s8xdb";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
buildInputs =
|
|
[ cmake pkgconfig boost libunwind mariadb.client libmemcached pcre gdb git perl
|
|
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 libkrb5
|
|
gmp libyaml libedit libvpx imagemagick fribidi gperf
|
|
];
|
|
|
|
enableParallelBuilding = false; # occasional build problems;
|
|
dontUseCmakeBuildDir = true;
|
|
NIX_LDFLAGS = "-lpam -L${pam}/lib";
|
|
|
|
# work around broken build system
|
|
NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
|
|
|
|
prePatch = ''
|
|
substituteInPlace hphp/util/generate-buildinfo.sh \
|
|
--replace /bin/bash ${stdenv.shell}
|
|
substituteInPlace ./configure \
|
|
--replace "/usr/bin/env bash" ${stdenv.shell}
|
|
perl -pi -e 's/([ \t(])(isnan|isinf)\(/$1std::$2(/g' \
|
|
hphp/runtime/base/*.cpp \
|
|
hphp/runtime/ext/std/*.cpp \
|
|
hphp/runtime/ext_zend_compat/php-src/main/*.cpp \
|
|
hphp/runtime/ext_zend_compat/php-src/main/*.h
|
|
patchShebangs .
|
|
'';
|
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
|
|
|
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 ];
|
|
};
|
|
}
|