nixpkgs/pkgs/development/compilers/hhvm/default.nix

66 lines
2.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached, pcre
2016-08-25 23:21:49 +00:00
, 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
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
, libxslt, ocaml, freetype, gdb, git, perl, mariadb, gmp, libyaml, libedit
2016-03-20 20:06:28 +00:00
, libvpx, imagemagick, fribidi, gperf
}:
stdenv.mkDerivation rec {
name = "hhvm-${version}";
2017-08-30 14:59:30 +00:00
version = "3.15.8";
# use git version since we need submodules
src = fetchgit {
url = "https://github.com/facebook/hhvm.git";
2017-08-30 14:59:30 +00:00
rev = "983bdab781d9d7bff5f14a4a2827c2c217c500df";
sha256 = "0sbjwdy69x08c4w0vf83dcfx3fin8qqysl9pacy2j6p0hxvgn5r5";
fetchSubmodules = true;
};
buildInputs =
[ cmake pkgconfig boost libunwind mariadb.client 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
2015-06-27 00:19:12 +00:00
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml libkrb5
2016-03-20 20:06:28 +00:00
gmp libyaml libedit libvpx imagemagick fribidi gperf
];
patches = [
./flexible-array-members-gcc6.patch
];
enableParallelBuilding = false; # occasional build problems;
dontUseCmakeBuildDir = true;
NIX_LDFLAGS = "-lpam -L${pam}/lib";
2014-06-26 19:44:39 +00:00
# work around broken build system
NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
2014-06-26 19:44:39 +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";
prePatch = ''
substituteInPlace hphp/util/generate-buildinfo.sh \
--replace /bin/bash ${stdenv.shell}
substituteInPlace ./configure \
--replace "/usr/bin/env 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
patchShebangs .
'';
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 ];
};
}