77 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_MAJOR[[:blank:]]+([[:digit:]]+)
78 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_MINOR[[:blank:]]+([[:digit:]]+)
79 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_PATCH[[:blank:]]+([[:digit:]]+)
80 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_SUFFIX[[:blank:]]+"([^"]*)"
83 (builtins.readFile ./hphp/runtime/version.h);
84 makePName = major: minor: patch: suffix:
85 if suffix == "-dev" then "hhvm_nightly" else "hhvm";
86 makeVersion = major: minor: patch: suffix:
87 if suffix == "-dev" then "${major}.${minor}.${patch}-${lastModifiedDate}" else "${major}.${minor}.${patch}";
88 rustNightly = rustChannelOf {
89 sha256 = "TpJKRroEs7V2BTo2GFPJlEScYVArFY2MnGpYTxbnSo8=";
94 stdenv.mkDerivation rec {
95 pname = builtins.foldl' lib.trivial.id makePName versionParts;
96 version = builtins.foldl' lib.trivial.id makeVersion versionParts;
163 ++ lib.optionals hostPlatform.isLinux [
169 ++ lib.optionals hostPlatform.isMacOS [
170 darwin.apple_sdk.frameworks.CoreFoundation
171 darwin.apple_sdk.frameworks.CoreServices
178 ++ lib.optionals hostPlatform.isMacOS [
179 # Workaround for dtoa.0.3.2
180 "-Wno-error=unused-command-line-argument"
185 # Use writeTextDir instead of writeTextFile as a workaround of https://github.com/xtruder/nix-devcontainer/issues/9
186 dir = writeTextDir "init-cache.cmake"
188 set(CAN_USE_SYSTEM_ZSTD ON CACHE BOOL "Use system zstd" FORCE)
189 set(HAVE_SYSTEM_TZDATA_PREFIX "${tzdata}/share/zoneinfo" CACHE STRING "The zoneinfo directory" FORCE)
190 set(HAVE_SYSTEM_TZDATA ON CACHE BOOL "Use system zoneinfo" FORCE)
191 set(MYSQL_UNIX_SOCK_ADDR "/run/mysqld/mysqld.sock" CACHE STRING "The MySQL unix socket" FORCE)
192 set(CARGO_EXECUTABLE "${rustNightly.cargo}/bin/cargo" CACHE FILEPATH "The nightly cargo" FORCE)
193 set(RUSTC_EXECUTABLE "${rustNightly.rust}/bin/rustc" CACHE FILEPATH "The nightly rustc" FORCE)
195 lib.optionalString hostPlatform.isMacOS ''
196 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Targeting macOS version" FORCE)
201 dir + "/init-cache.cmake";
203 cmakeFlags = [ "-C" cmakeInitCache ];
213 -f third-party/proxygen/CMakeFiles/bundled_proxygen.dir/build.make \
214 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen-stamp/bundled_proxygen-patch
216 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen
220 description = "High-performance JIT compiler for PHP/Hack";
225 homepage = "https://hhvm.com";
230 fullName = "Zend License v2.0";
231 url = "https://www.zend.com/sites/zend/files/pdfs/2_00.txt";
235 email = "hhvm-oss@fb.com";
238 name = "HHVM/Hack Open Source";