2023-02-16 17:41:37 +00:00
|
|
|
{ boost
|
|
|
|
, cmake
|
|
|
|
, config
|
|
|
|
, CoreServices
|
|
|
|
, cpptoml
|
|
|
|
, double-conversion
|
|
|
|
, edencommon
|
|
|
|
, ensureNewerSourcesForZipFilesHook
|
|
|
|
, fb303
|
|
|
|
, fbthrift
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fizz
|
|
|
|
, fmt_8
|
|
|
|
, folly
|
|
|
|
, glog
|
|
|
|
, gtest
|
|
|
|
, lib
|
|
|
|
, libevent
|
|
|
|
, libiconv
|
|
|
|
, libsodium
|
|
|
|
, libunwind
|
|
|
|
, lz4
|
|
|
|
, openssl
|
|
|
|
, pcre
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, rustPlatform
|
|
|
|
, stateDir ? "/tmp"
|
|
|
|
, stdenv
|
|
|
|
, wangle
|
|
|
|
, zlib
|
|
|
|
, zstd
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "watchman";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "2023.01.30.00";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "watchman";
|
|
|
|
rev = "v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-ZtCUlxx3YgfwKa9J8o9GkdkHquJbh+EytLiGNRlABls=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
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}"
|
2023-03-24 00:07:29 +00:00
|
|
|
"-DWATCHMAN_VERSION_OVERRIDE=${version}"
|
2023-02-16 17:41:37 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
ensureNewerSourcesForZipFilesHook
|
|
|
|
] ++ (with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
rust.cargo
|
|
|
|
rust.rustc
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
buildInputs = [
|
|
|
|
pcre
|
|
|
|
openssl
|
|
|
|
python3
|
|
|
|
gtest
|
|
|
|
glog
|
|
|
|
boost
|
|
|
|
libevent
|
|
|
|
fmt_8
|
|
|
|
libsodium
|
|
|
|
zlib
|
|
|
|
folly
|
|
|
|
fizz
|
|
|
|
wangle
|
|
|
|
fbthrift
|
|
|
|
fb303
|
|
|
|
cpptoml
|
|
|
|
edencommon
|
|
|
|
libunwind
|
|
|
|
double-conversion
|
|
|
|
lz4
|
|
|
|
zstd
|
|
|
|
libiconv
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ CoreServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
cargoRoot = "watchman/cli";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
cp ${./Cargo.lock} ${cargoRoot}/Cargo.lock
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Watches files and takes action when they change";
|
2023-02-16 17:41:37 +00:00
|
|
|
homepage = "https://facebook.github.io/watchman";
|
|
|
|
maintainers = with maintainers; [ cstrahan kylesferrazza ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|