forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / wangle / default.nix
blobd07145641a7034f79d09d9b8fd603893fb569863
1 { stdenv
2 , lib
3 , fetchFromGitHub
4 , cmake
5 , boost
6 , libevent
7 , double-conversion
8 , glog
9 , fmt_8
10 , gflags
11 , openssl
12 , fizz
13 , folly
14 , gtest
15 , libsodium
16 , zlib
19 stdenv.mkDerivation (finalAttrs: {
20   pname = "wangle";
21   version = "2024.03.11.00";
23   src = fetchFromGitHub {
24     owner = "facebook";
25     repo = "wangle";
26     rev = "v${finalAttrs.version}";
27     sha256 = "sha256-fDtJ+9bZj+siKlMglYMkLO/+jldUmsS5V3Umk1gNdlo=";
28   };
30   nativeBuildInputs = [ cmake ];
32   cmakeDir = "../wangle";
34   cmakeFlags = [
35     "-Wno-dev"
36     (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
37   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
38     "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
39   ];
41   buildInputs = [
42     fmt_8
43     libsodium
44     zlib
45     boost
46     double-conversion
47     fizz
48     folly
49     glog
50     gflags
51     libevent
52     openssl
53   ];
55   doCheck = true;
56   checkInputs = [
57     gtest
58   ];
59   preCheck = let
60     disabledTests = [
61       # these depend on example pem files from the folly source tree (?)
62       "SSLContextManagerTest.TestSingleClientCAFileSet"
63       "SSLContextManagerTest.TestMultipleClientCAsSet"
65       # https://github.com/facebook/wangle/issues/206
66       "SSLContextManagerTest.TestSessionContextCertRemoval"
67     ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
68       # flaky
69       "BroadcastPoolTest.ThreadLocalPool"
70       "Bootstrap.UDPClientServerTest"
71     ];
72   in ''
73     export GTEST_FILTER="-${lib.concatStringsSep ":" disabledTests}"
74   '';
76   meta = with lib; {
77     description = "Open-source C++ networking library";
78     longDescription = ''
79       Wangle is a framework providing a set of common client/server
80       abstractions for building services in a consistent, modular, and
81       composable way.
82     '';
83     homepage = "https://github.com/facebook/wangle";
84     license = licenses.asl20;
85     platforms = platforms.unix;
86     maintainers = with maintainers; [ pierreis kylesferrazza ];
87   };