2017-12-10 09:14:39 +00:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached
|
2017-11-09 18:58:56 +00:00
|
|
|
, pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
|
2015-06-27 00:19:12 +00:00
|
|
|
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
|
2014-06-10 11:12:12 +00:00
|
|
|
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
|
2019-09-22 07:38:09 +00:00
|
|
|
, libxslt, freetype, gdb, git, perl, libmysqlclient, gmp, libyaml, libedit
|
2017-10-11 22:46:38 +00:00
|
|
|
, libvpx, imagemagick, fribidi, gperf, which, ocamlPackages
|
2014-06-10 11:12:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "hhvm";
|
2017-12-10 09:14:39 +00:00
|
|
|
version = "3.23.2";
|
2014-06-10 11:12:12 +00:00
|
|
|
|
2014-12-12 16:05:08 +00:00
|
|
|
# use git version since we need submodules
|
2014-06-10 11:12:12 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/facebook/hhvm.git";
|
2017-12-10 09:14:39 +00:00
|
|
|
rev = "HHVM-${version}";
|
|
|
|
sha256 = "1nic49j8nghx82lgvz0b95r78sqz46qaaqv4nx48p8yrj9ysnd7i";
|
2014-06-10 11:12:12 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs =
|
2019-09-22 07:38:09 +00:00
|
|
|
[ cmake pkgconfig boost libunwind libmysqlclient libmemcached pcre gdb git perl
|
2014-09-19 17:56:08 +00:00
|
|
|
libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
|
|
|
|
oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
|
2017-10-11 22:46:38 +00:00
|
|
|
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5
|
2017-08-30 17:40:20 +00:00
|
|
|
gmp libyaml libedit libvpx imagemagick fribidi gperf which
|
2017-10-11 22:46:38 +00:00
|
|
|
ocamlPackages.ocaml ocamlPackages.ocamlbuild
|
2014-06-10 11:12:12 +00:00
|
|
|
];
|
|
|
|
|
2017-08-29 15:13:32 +00:00
|
|
|
patches = [
|
|
|
|
./flexible-array-members-gcc6.patch
|
|
|
|
];
|
|
|
|
|
2017-11-16 15:52:52 +00:00
|
|
|
enableParallelBuilding = true;
|
2014-06-10 11:12:12 +00:00
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
NIX_LDFLAGS = "-lpam -L${pam}/lib";
|
|
|
|
|
2014-06-26 19:44:39 +00:00
|
|
|
# work around broken build system
|
2016-04-16 16:52:29 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
|
2014-06-26 19:44:39 +00:00
|
|
|
|
2017-03-06 11:25:43 +00:00
|
|
|
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
|
|
|
|
# (setting it to an absolute path causes include files to go to $out/$out/include,
|
|
|
|
# because the absolute path is interpreted with root at $out).
|
|
|
|
cmakeFlags = "-DCMAKE_INSTALL_INCLUDEDIR=include";
|
|
|
|
|
2014-12-12 16:05:08 +00:00
|
|
|
prePatch = ''
|
2014-07-20 00:44:08 +00:00
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace "/usr/bin/env bash" ${stdenv.shell}
|
2017-08-30 17:40:20 +00:00
|
|
|
substituteInPlace ./third-party/ocaml/CMakeLists.txt \
|
|
|
|
--replace "/bin/bash" ${stdenv.shell}
|
2016-03-20 20:06:28 +00:00
|
|
|
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
|
2018-02-18 17:41:39 +00:00
|
|
|
sed '1i#include <functional>' -i third-party/mcrouter/src/mcrouter/lib/cycles/Cycles.h
|
2016-03-20 20:06:28 +00:00
|
|
|
patchShebangs .
|
2014-06-10 11:12:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "High-performance JIT compiler for PHP/Hack";
|
2018-05-01 03:03:23 +00:00
|
|
|
homepage = "https://hhvm.com";
|
2014-06-10 11:12:12 +00:00
|
|
|
license = "PHP/Zend";
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
2018-08-29 12:34:38 +00:00
|
|
|
broken = true; # Since 2018-04-21, see https://hydra.nixos.org/build/73059373
|
2014-06-10 11:12:12 +00:00
|
|
|
};
|
|
|
|
}
|