1{ stdenv
2, lib
3, fetchFromGitHub
4, cmake
5, fbthrift
6, fizz
7, folly
8, glog
9, libsodium
10, mvfst
11, python3
12, wangle
13, zlib
14}:
15
16stdenv.mkDerivation rec {
17 pname = "fb303";
18 version = "2024.03.11.00";
19
20 src = fetchFromGitHub {
21 owner = "facebook";
22 repo = "fb303";
23 rev = "v${version}";
24 sha256 = "sha256-Jtztb8CTqvRdRjUa3jaouP5PFAwoM4rKLIfgvOyXUIg=";
25 };
26
27 nativeBuildInputs = [ cmake ];
28 cmakeFlags = [
29 "-DPYTHON_EXTENSIONS=OFF"
30 ] ++ lib.optionals stdenv.isDarwin [
31 "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
32 ];
33
34 buildInputs = [
35 fbthrift
36 fizz
37 folly
38 folly.boost
39 folly.fmt
40 glog
41 libsodium
42 mvfst
43 python3
44 wangle
45 zlib
46 ];
47
48 meta = with lib; {
49 description = "Base Thrift service and a common set of functionality for querying stats, options, and other information from a service";
50 homepage = "https://github.com/facebook/fb303";
51 license = licenses.asl20;
52 platforms = platforms.unix;
53 maintainers = with maintainers; [ kylesferrazza ];
54 };
55}