Files
nixpkgs/pkgs/by-name/ed/edencommon/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

112 lines
2.4 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,
glog,
gflags,
folly,
fb303,
wangle,
fbthrift,
gtest,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "edencommon";
version = "2025.09.15.00";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "facebookexperimental";
repo = "edencommon";
tag = "v${finalAttrs.version}";
hash = "sha256-KyJAosCLGnpEG968GV9BOyOrsoHS7BbRatTfBqzTelU=";
};
patches = [
./glog-0.7.patch
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# Test discovery timeout is bizarrely flaky on `x86_64-darwin`
./increase-test-discovery-timeout.patch
];
nativeBuildInputs = [
cmake
ninja
];
buildInputs = [
glog
gflags
folly
fb303
wangle
fbthrift
gtest
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "CMAKE_INSTALL_RPATH_USE_LINK_PATH" true)
(lib.cmakeFeature "INCLUDE_INSTALL_DIR" "${placeholder "dev"}/include")
(lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
(lib.cmakeFeature "CMAKE_INSTALL_DIR" "${placeholder "dev"}/lib/cmake/edencommon")
];
doCheck = true;
checkPhase = ''
runHook preCheck
# Skip flaky test
ctest -j $NIX_BUILD_CORES --output-on-failure ${
lib.escapeShellArgs [
"--exclude-regex"
(lib.concatMapStringsSep "|" (test: "^${lib.escapeRegex test}$") [
"ProcessInfoCache.addFromMultipleThreads"
])
]
}
runHook postCheck
'';
postPatch = ''
# The CMake build requires the FBThrift Python support even though
# its not used, presumably because of the relevant code having
# been moved in from another repository.
substituteInPlace CMakeLists.txt \
--replace-fail \
'find_package(FBThrift CONFIG REQUIRED COMPONENTS cpp2 py)' \
'find_package(FBThrift CONFIG REQUIRED COMPONENTS cpp2)'
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Shared library for Meta's source control filesystem tools (EdenFS and Watchman)";
homepage = "https://github.com/facebookexperimental/edencommon";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
kylesferrazza
emily
techknowlogick
];
};
})