Files
nixpkgs/pkgs/by-name/wa/watchman/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

127 lines
2.3 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
pkg-config,
rustc,
cargo,
rustPlatform,
ensureNewerSourcesForZipFilesHook,
pcre2,
openssl,
gflags,
glog,
libevent,
edencommon,
folly,
fizz,
wangle,
fbthrift,
fb303,
cpptoml,
gtest,
nix-update-script,
stateDir ? "",
}:
stdenv.mkDerivation (finalAttrs: {
pname = "watchman";
version = "2025.09.15.00";
src = fetchFromGitHub {
owner = "facebook";
repo = "watchman";
tag = "v${finalAttrs.version}";
hash = "sha256-ZIFGCOoIuy4Ns51oek3HnBLtCSnI742FTA2YmorBpyk=";
};
patches = [
./glog-0.7.patch
];
nativeBuildInputs = [
cmake
ninja
pkg-config
rustc
cargo
rustPlatform.cargoSetupHook
ensureNewerSourcesForZipFilesHook
];
buildInputs = [
pcre2
openssl
gflags
glog
libevent
edencommon
folly
fizz
wangle
fbthrift
fb303
cpptoml
];
checkInputs = [
gtest
];
cmakeFlags = [
(lib.cmakeBool "CMAKE_INSTALL_RPATH_USE_LINK_PATH" true)
(lib.cmakeFeature "WATCHMAN_STATE_DIR" stateDir)
(lib.cmakeFeature "WATCHMAN_VERSION_OVERRIDE" finalAttrs.version)
];
cargoRoot = "watchman/cli";
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
};
doCheck = true;
postPatch = ''
patchShebangs .
cp ${./Cargo.lock} ${finalAttrs.cargoRoot}/Cargo.lock
# The build system looks for `/usr/bin/python3`. It falls back
# gracefully if its not found, but lets dodge the potential
# reproducibility risk for unsandboxed Darwin.
substituteInPlace CMakeLists.txt \
--replace-fail /usr/bin /var/empty
# Facebook Thrift requires C++20 now but Watchman hasnt been
# updated yet (Arent these things meant to be integrated together
# in a monorepo?)
substituteInPlace CMakeLists.txt \
--replace-fail 'set(CMAKE_CXX_STANDARD 17)' 'set(CMAKE_CXX_STANDARD 20)'
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Watches files and takes action when they change";
homepage = "https://facebook.github.io/watchman";
maintainers = with lib.maintainers; [
kylesferrazza
emily
techknowlogick
];
mainProgram = "watchman";
platforms = lib.platforms.unix;
license = lib.licenses.mit;
};
})