watchman: convert to new Darwin SDK pattern

(cherry picked from commit 1c60ec77f4)
This commit is contained in:
Emily 2024-11-13 16:11:15 +00:00 committed by github-actions[bot]
parent 63da22ec64
commit bbb05186d9
2 changed files with 33 additions and 35 deletions

View File

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

View File

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