76 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_MAJOR[[:blank:]]+([[:digit:]]+)
77 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_MINOR[[:blank:]]+([[:digit:]]+)
78 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_PATCH[[:blank:]]+([[:digit:]]+)
79 #[[:blank:]]*define[[:blank:]]+HHVM_VERSION_SUFFIX[[:blank:]]+"([^"]*)"
82 (builtins.readFile ./hphp/runtime/version.h);
83 makeVersion = major: minor: patch: suffix:
84 if suffix == "-dev" then "${major}.${minor}.${patch}-dev${lastModifiedDate}" else "${major}.${minor}.${patch}";
85 rustNightly = rustChannelOf {
86 sha256 = "TpJKRroEs7V2BTo2GFPJlEScYVArFY2MnGpYTxbnSo8=";
91 stdenv.mkDerivation rec {
93 version = builtins.foldl' lib.trivial.id makeVersion versionParts;
159 ++ lib.optionals hostPlatform.isLinux [
165 ++ lib.optionals hostPlatform.isMacOS [
166 darwin.apple_sdk.frameworks.CoreFoundation
167 darwin.apple_sdk.frameworks.CoreServices
174 ++ lib.optionals hostPlatform.isMacOS [
175 # Workaround for dtoa.0.3.2
176 "-Wno-error=unused-command-line-argument"
181 # Use writeTextDir instead of writeTextFile as a workaround of https://github.com/xtruder/nix-devcontainer/issues/9
182 dir = writeTextDir "init-cache.cmake"
184 set(CAN_USE_SYSTEM_ZSTD ON CACHE BOOL "Use system zstd" FORCE)
185 set(HAVE_SYSTEM_TZDATA_PREFIX "${tzdata}/share/zoneinfo" CACHE PATH "The zoneinfo directory" FORCE)
186 set(HAVE_SYSTEM_TZDATA ON CACHE BOOL "Use system zoneinfo" FORCE)
187 set(MYSQL_UNIX_SOCK_ADDR "/run/mysqld/mysqld.sock" CACHE FILEPATH "The MySQL unix socket" FORCE)
188 set(CARGO_EXECUTABLE "${rustNightly.cargo}/bin/cargo" CACHE FILEPATH "The nightly cargo" FORCE)
189 set(RUSTC_EXECUTABLE "${rustNightly.rust}/bin/rustc" CACHE FILEPATH "The nightly rustc" FORCE)
191 lib.optionalString hostPlatform.isMacOS ''
192 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Targeting macOS version" FORCE)
197 dir + "/init-cache.cmake";
199 cmakeFlags = [ "-C" CMAKE_INIT_CACHE ];
209 -f third-party/proxygen/CMakeFiles/bundled_proxygen.dir/build.make \
210 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen-stamp/bundled_proxygen-patch
212 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen
216 description = "High-performance JIT compiler for PHP/Hack";
221 homepage = "https://hhvm.com";
226 fullName = "Zend License v2.0";
227 url = "https://www.zend.com/sites/zend/files/pdfs/2_00.txt";
231 email = "hhvm-oss@fb.com";
234 name = "HHVM/Hack Open Source";