watchman: convert to new Darwin SDK pattern

This commit is contained in:
Emily 2024-11-13 16:11:15 +00:00
parent ca944d626b
commit 1c60ec77f4
2 changed files with 33 additions and 35 deletions

View File

@ -1,7 +1,6 @@
{ {
cargo, cargo,
cmake, cmake,
CoreServices,
cpptoml, cpptoml,
double-conversion, double-conversion,
edencommon, edencommon,
@ -16,7 +15,6 @@
gtest, gtest,
lib, lib,
libevent, libevent,
libiconv,
libsodium, libsodium,
libunwind, libunwind,
lz4, lz4,
@ -29,6 +27,8 @@
stdenv, stdenv,
wangle, wangle,
zstd, zstd,
apple-sdk_11,
darwinMinVersionHook,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -42,16 +42,12 @@ stdenv.mkDerivation rec {
hash = "sha256-cD8mIYCc+8Z2p3rwKVRFcW9sOBbpb5KHU5VpbXHMpeg="; hash = "sha256-cD8mIYCc+8Z2p3rwKVRFcW9sOBbpb5KHU5VpbXHMpeg=";
}; };
cmakeFlags = cmakeFlags = [
[ "-DBUILD_SHARED_LIBS=ON"
"-DBUILD_SHARED_LIBS=ON" "-DENABLE_EDEN_SUPPORT=NO" # requires sapling (formerly known as eden), which is not packaged in nixpkgs
"-DENABLE_EDEN_SUPPORT=NO" # requires sapling (formerly known as eden), which is not packaged in nixpkgs "-DWATCHMAN_STATE_DIR=${stateDir}"
"-DWATCHMAN_STATE_DIR=${stateDir}" "-DWATCHMAN_VERSION_OVERRIDE=${version}"
"-DWATCHMAN_VERSION_OVERRIDE=${version}" ];
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
@ -62,26 +58,30 @@ stdenv.mkDerivation rec {
rustc rustc
]; ];
buildInputs = [ buildInputs =
pcre2 [
openssl pcre2
gtest openssl
glog gtest
libevent glog
libsodium libevent
folly libsodium
fizz folly
wangle fizz
fbthrift wangle
fb303 fbthrift
cpptoml fb303
edencommon cpptoml
libunwind edencommon
double-conversion libunwind
lz4 double-conversion
zstd lz4
libiconv zstd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
(darwinMinVersionHook "11.0")
];
cargoRoot = "watchman/cli"; cargoRoot = "watchman/cli";

View File

@ -5733,9 +5733,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Cocoa AppKit; inherit (darwin.apple_sdk.frameworks) Cocoa AppKit;
}; };
watchman = darwin.apple_sdk_11_0.callPackage ../development/tools/watchman { watchman = callPackage ../development/tools/watchman { };
inherit (darwin.apple_sdk_11_0.frameworks) CoreServices;
};
webassemblyjs-cli = nodePackages."@webassemblyjs/cli-1.11.1"; webassemblyjs-cli = nodePackages."@webassemblyjs/cli-1.11.1";
webassemblyjs-repl = nodePackages."@webassemblyjs/repl-1.11.1"; webassemblyjs-repl = nodePackages."@webassemblyjs/repl-1.11.1";