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 makeVersion = major: minor: patch: suffix:
85 if suffix == "-dev" then "${major}.${minor}.${patch}-dev${lastModifiedDate}" else "${major}.${minor}.${patch}";
87 rustNightly = rustChannelOf {
89 # When the date attribute changes, sha256 should be updated accordingly.
91 # 1. Export your diff to GitHub;
92 # 2. Wait for an error message about sha256 mismatch from the GitHub
94 # 3. Copy the new sha256 from the error message and paste it here;
95 # 4. Submit the diff and export the diff to GitHub, again.
96 # 5. Ensure no error message about sha256 mismatch from the GitHub Actions.
97 sha256 = "wVnIzrnpYGqiCBtc3k55tw4VW8YLA3WZY0mSac+2yl0=";
103 stdenv.mkDerivation rec {
105 version = builtins.foldl' lib.trivial.id makeVersion versionParts;
117 ] ++ lib.optionals hostPlatform.isMacOS [
118 # `system_cmds` provides `sysctl`, which is used in hphp/test/run.php on macOS
123 (boost.override { inherit stdenv; })
126 (curl.override { openssl = openssl_1_1; })
127 (double-conversion.override { inherit stdenv; })
130 (fmt.override { inherit stdenv; })
140 gflags = gflags.override { inherit stdenv; };
141 }).overrideAttrs (finalAttrs: previousAttrs: {
142 # Workaround for https://github.com/google/glog/issues/709
143 doCheck = !stdenv.cc.isClang;
147 (gperf.override { inherit stdenv; })
148 (gperftools.override { inherit stdenv; })
149 (icu.override { inherit stdenv; })
176 (tbb.override { inherit stdenv; })
182 ++ lib.optionals hostPlatform.isLinux [
188 ++ lib.optionals hostPlatform.isMacOS [
189 darwin.apple_sdk.frameworks.CoreFoundation
190 darwin.apple_sdk.frameworks.CoreServices
197 ++ lib.optionals stdenv.cc.isClang [
198 # Workaround for dtoa.0.3.2
199 "-Wno-error=unused-command-line-argument"
204 # Use writeTextDir instead of writeTextFile as a workaround of https://github.com/xtruder/nix-devcontainer/issues/9
205 dir = writeTextDir "init-cache.cmake"
207 set(CAN_USE_SYSTEM_ZSTD ON CACHE BOOL "Use system zstd" FORCE)
208 set(HAVE_SYSTEM_TZDATA_PREFIX "${tzdata}/share/zoneinfo" CACHE PATH "The zoneinfo directory" FORCE)
209 set(HAVE_SYSTEM_TZDATA ON CACHE BOOL "Use system zoneinfo" FORCE)
210 set(MYSQL_UNIX_SOCK_ADDR "/run/mysqld/mysqld.sock" CACHE FILEPATH "The MySQL unix socket" FORCE)
211 set(CARGO_EXECUTABLE "${rustNightly.cargo}/bin/cargo" CACHE FILEPATH "The nightly cargo" FORCE)
212 set(RUSTC_EXECUTABLE "${rustNightly.rust}/bin/rustc" CACHE FILEPATH "The nightly rustc" FORCE)
214 lib.optionalString hostPlatform.isMacOS ''
215 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Targeting macOS version" FORCE)
220 dir + "/init-cache.cmake";
222 cmakeFlags = [ "-C" CMAKE_INIT_CACHE ];
232 -f third-party/proxygen/CMakeFiles/bundled_proxygen.dir/build.make \
233 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen-stamp/bundled_proxygen-patch
235 third-party/proxygen/bundled_proxygen-prefix/src/bundled_proxygen
244 export HHVM_BIN="$PWD/hphp/hhvm/hhvm"
245 (cd ${./.} && "$HHVM_BIN" hphp/test/run.php quick)
250 description = "High-performance JIT compiler for PHP/Hack";
255 homepage = "https://hhvm.com";
260 fullName = "Zend License v2.0";
261 url = "https://www.zend.com/sites/zend/files/pdfs/2_00.txt";
265 email = "hhvm-oss@fb.com";
268 name = "HHVM/Hack Open Source";