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,
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,15 +42,11 @@ stdenv.mkDerivation rec {
hash = "sha256-cD8mIYCc+8Z2p3rwKVRFcW9sOBbpb5KHU5VpbXHMpeg=";
};
cmakeFlags =
[
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
];
nativeBuildInputs = [
@ -62,7 +58,8 @@ stdenv.mkDerivation rec {
rustc
];
buildInputs = [
buildInputs =
[
pcre2
openssl
gtest
@ -80,8 +77,11 @@ stdenv.mkDerivation rec {
double-conversion
lz4
zstd
libiconv
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
(darwinMinVersionHook "11.0")
];
cargoRoot = "watchman/cli";

View File

@ -5733,9 +5733,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";