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;
116 ] ++ lib.optionals hostPlatform.isMacOS [
117 # `system_cmds` provides `sysctl`, which is used in hphp/test/run.php on macOS
122 (boost.override { inherit stdenv; })
125 (curl.override { openssl = openssl_1_1; })
126 (double-conversion.override { inherit stdenv; })
129 (fmt_8.override { inherit stdenv; })
139 gflags = gflags.override { inherit stdenv; };
140 }).overrideAttrs (finalAttrs: previousAttrs: {
141 # Workaround for https://github.com/google/glog/issues/709
142 doCheck = !stdenv.cc.isClang;
146 (gperf.override { inherit stdenv; })
147 (gperftools.override { inherit stdenv; })
148 (icu.override { inherit stdenv; })
174 (tbb.override { inherit stdenv; })
180 ++ lib.optionals hostPlatform.isLinux [
186 ++ lib.optionals hostPlatform.isMacOS [
187 darwin.apple_sdk.frameworks.CoreFoundation
188 darwin.apple_sdk.frameworks.CoreServices
192 lib.optionals stdenv.cc.isClang [
193 # Workaround for dtoa.0.3.2
194 "-Wno-error=unused-command-line-argument"
199 # Use writeTextDir instead of writeTextFile as a workaround of https://github.com/xtruder/nix-devcontainer/issues/9
200 dir = writeTextDir "init-cache.cmake"
202 set(CAN_USE_SYSTEM_ZSTD ON CACHE BOOL "Use system zstd" FORCE)
203 set(HAVE_SYSTEM_TZDATA_PREFIX "${tzdata}/share/zoneinfo" CACHE PATH "The zoneinfo directory" FORCE)
204 set(HAVE_SYSTEM_TZDATA ON CACHE BOOL "Use system zoneinfo" FORCE)
205 set(MYSQL_UNIX_SOCK_ADDR "/run/mysqld/mysqld.sock" CACHE FILEPATH "The MySQL unix socket" FORCE)
206 set(CARGO_EXECUTABLE "${rustNightly.cargo}/bin/cargo" CACHE FILEPATH "The nightly cargo" FORCE)
207 set(RUSTC_EXECUTABLE "${rustNightly.rust}/bin/rustc" CACHE FILEPATH "The nightly rustc" FORCE)
209 lib.optionalString hostPlatform.isMacOS ''
210 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Targeting macOS version" FORCE)
215 dir + "/init-cache.cmake";
217 cmakeFlags = [ "-C" CMAKE_INIT_CACHE ];
227 -f third-party/proxygen/CMakeFiles/bundled_proxygen.dir/build.make \
228 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen-stamp/bundled_proxygen-patch
230 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen
239 export HHVM_BIN="$PWD/hphp/hhvm/hhvm"
240 (cd ${./.} && "$HHVM_BIN" hphp/test/run.php quick)
245 description = "High-performance JIT compiler for PHP/Hack";
250 homepage = "https://hhvm.com";
255 fullName = "Zend License v2.0";
256 url = "https://www.zend.com/sites/zend/files/pdfs/2_00.txt";
260 email = "hhvm-oss@fb.com";
263 name = "HHVM/Hack Open Source";