about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/wangle/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wangle/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/wangle/default.nix34
1 files changed, 27 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/wangle/default.nix b/nixpkgs/pkgs/development/libraries/wangle/default.nix
index 4afbb38094e2..d30389d97259 100644
--- a/nixpkgs/pkgs/development/libraries/wangle/default.nix
+++ b/nixpkgs/pkgs/development/libraries/wangle/default.nix
@@ -16,15 +16,15 @@
 , zlib
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "wangle";
-  version = "2023.04.03.00";
+  version = "2024.01.22.00";
 
   src = fetchFromGitHub {
     owner = "facebook";
     repo = "wangle";
-    rev = "v${version}";
-    sha256 = "sha256-ISf/ezcJKCNv5UEGSf+OmHjV+QkanbTNoAm2ci1qy0o=";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-pXcJszncYWvtwT4guEl69rOAIXZzgF7I6qh8PqLbxdA=";
   };
 
   nativeBuildInputs = [ cmake ];
@@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [
     "-Wno-dev"
+    (lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
   ] ++ lib.optionals stdenv.isDarwin [
-    "-DBUILD_TESTS=off" # Tests fail on Darwin due to missing utimensat
     "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
   ];
 
@@ -46,13 +46,33 @@ stdenv.mkDerivation rec {
     double-conversion
     fizz
     folly
-    gtest
     glog
     gflags
     libevent
     openssl
   ];
 
+  doCheck = true;
+  checkInputs = [
+    gtest
+  ];
+  preCheck = let
+    disabledTests = [
+      # these depend on example pem files from the folly source tree (?)
+      "SSLContextManagerTest.TestSingleClientCAFileSet"
+      "SSLContextManagerTest.TestMultipleClientCAsSet"
+
+      # https://github.com/facebook/wangle/issues/206
+      "SSLContextManagerTest.TestSessionContextCertRemoval"
+    ] ++ lib.optionals stdenv.isDarwin [
+      # flaky
+      "BroadcastPoolTest.ThreadLocalPool"
+      "Bootstrap.UDPClientServerTest"
+    ];
+  in ''
+    export GTEST_FILTER="-${lib.concatStringsSep ":" disabledTests}"
+  '';
+
   meta = with lib; {
     description = "An open-source C++ networking library";
     longDescription = ''
@@ -65,4 +85,4 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
     maintainers = with maintainers; [ pierreis kylesferrazza ];
   };
-}
+})