nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4
5 fetchFromGitHub,
6
7 cmake,
8 ninja,
9
10 folly,
11 fizz,
12 openssl,
13 glog,
14 gflags,
15 libevent,
16 double-conversion,
17
18 ctestCheckHook,
19
20 gtest,
21
22 nix-update-script,
23}:
24
25stdenv.mkDerivation (finalAttrs: {
26 pname = "wangle";
27 version = "2025.10.13.00";
28
29 outputs = [
30 "out"
31 "dev"
32 ];
33
34 src = fetchFromGitHub {
35 owner = "facebook";
36 repo = "wangle";
37 tag = "v${finalAttrs.version}";
38 hash = "sha256-lptILtCaVeO8yXlIYHaATfJw6VyPxUJCx7nxfOZVIIc=";
39 };
40
41 patches = [
42 ./glog-0.7.patch
43 ];
44
45 nativeBuildInputs = [
46 cmake
47 ninja
48 ];
49
50 buildInputs = [
51 folly
52 fizz
53 openssl
54 glog
55 gflags
56 libevent
57 double-conversion
58 ];
59
60 nativeCheckInputs = [
61 ctestCheckHook
62 ];
63
64 checkInputs = [
65 gtest
66 ];
67
68 cmakeDir = "../wangle";
69
70 cmakeFlags = [
71 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
72
73 (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
74
75 (lib.cmakeFeature "INCLUDE_INSTALL_DIR" "${placeholder "dev"}/include")
76 (lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
77 (lib.cmakeFeature "CMAKE_INSTALL_DIR" "${placeholder "dev"}/lib/cmake/wangle")
78 ];
79
80 __darwinAllowLocalNetworking = true;
81
82 doCheck = true;
83
84 dontUseNinjaCheck = true;
85
86 disabledTests = [
87 # Deterministic glibc abort 🫠
88 "BootstrapTest"
89 "BroadcastPoolTest"
90
91 # SSLContextManagerTest uses 15+ GB of RAM
92 "SSLContextManagerTest"
93 ];
94
95 passthru.updateScript = nix-update-script { };
96
97 meta = {
98 description = "Open-source C++ networking library";
99 longDescription = ''
100 Wangle is a framework providing a set of common client/server
101 abstractions for building services in a consistent, modular, and
102 composable way.
103 '';
104 homepage = "https://github.com/facebook/wangle";
105 license = lib.licenses.asl20;
106 platforms = lib.platforms.unix;
107 maintainers = with lib.maintainers; [
108 pierreis
109 kylesferrazza
110 emily
111 techknowlogick
112 lf-
113 ];
114 };
115})