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}";
86 rustNightly = rustChannelOf {
88 # When the date attribute changes, sha256 should be updated accordingly.
90 # 1. Export your diff to GitHub;
91 # 2. Wait for an error message about sha256 mismatch from the GitHub
93 # 3. Copy the new sha256 from the error message and paste it here;
94 # 4. Submit the diff and export the diff to GitHub, again.
95 # 5. Ensure no error message about sha256 mismatch from the GitHub Actions.
96 sha256 = "wVnIzrnpYGqiCBtc3k55tw4VW8YLA3WZY0mSac+2yl0=";
102 stdenv.mkDerivation rec {
104 version = builtins.foldl' lib.trivial.id makeVersion versionParts;
170 ++ lib.optionals hostPlatform.isLinux [
176 ++ lib.optionals hostPlatform.isMacOS [
177 darwin.apple_sdk.frameworks.CoreFoundation
178 darwin.apple_sdk.frameworks.CoreServices
185 ++ lib.optionals hostPlatform.isMacOS [
186 # Workaround for dtoa.0.3.2
187 "-Wno-error=unused-command-line-argument"
192 # Use writeTextDir instead of writeTextFile as a workaround of https://github.com/xtruder/nix-devcontainer/issues/9
193 dir = writeTextDir "init-cache.cmake"
195 set(CAN_USE_SYSTEM_ZSTD ON CACHE BOOL "Use system zstd" FORCE)
196 set(HAVE_SYSTEM_TZDATA_PREFIX "${tzdata}/share/zoneinfo" CACHE PATH "The zoneinfo directory" FORCE)
197 set(HAVE_SYSTEM_TZDATA ON CACHE BOOL "Use system zoneinfo" FORCE)
198 set(MYSQL_UNIX_SOCK_ADDR "/run/mysqld/mysqld.sock" CACHE FILEPATH "The MySQL unix socket" FORCE)
199 set(CARGO_EXECUTABLE "${rustNightly.cargo}/bin/cargo" CACHE FILEPATH "The nightly cargo" FORCE)
200 set(RUSTC_EXECUTABLE "${rustNightly.rust}/bin/rustc" CACHE FILEPATH "The nightly rustc" FORCE)
202 lib.optionalString hostPlatform.isMacOS ''
203 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Targeting macOS version" FORCE)
208 dir + "/init-cache.cmake";
210 cmakeFlags = [ "-C" CMAKE_INIT_CACHE ];
220 -f third-party/proxygen/CMakeFiles/bundled_proxygen.dir/build.make \
221 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen-stamp/bundled_proxygen-patch
223 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen
227 description = "High-performance JIT compiler for PHP/Hack";
232 homepage = "https://hhvm.com";
237 fullName = "Zend License v2.0";
238 url = "https://www.zend.com/sites/zend/files/pdfs/2_00.txt";
242 email = "hhvm-oss@fb.com";
245 name = "HHVM/Hack Open Source";