about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libcouchbase
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-11 23:37:02 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-11 23:41:30 +0000
commit6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch)
tree035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/libraries/libcouchbase
parentda7500bc026e937ac7fce7b50f67a0e1765737a7 (diff)
parente4134747f5666bcab8680aff67fa3b63384f9a0f (diff)
downloadnixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libcouchbase')
-rw-r--r--nixpkgs/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/libcouchbase/default.nix4
2 files changed, 39 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch b/nixpkgs/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch
new file mode 100644
index 000000000000..1c57757f855c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch
@@ -0,0 +1,36 @@
+From 58237e64fa77ec5cdec658b3295f71ec899175fa Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Sat, 5 Oct 2019 13:47:59 +0200
+Subject: [PATCH] Fix timeouts in libcouchbase testsuite
+
+Nix-specific patch. Basically
+https://github.com/couchbase/libcouchbase/commit/b272f6ab88be523bbcf9d5c4252d07fccb023fe5, but
+rebased onto 2.10.4.
+---
+ src/ssl/ssl_e.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/ssl/ssl_e.c b/src/ssl/ssl_e.c
+index f4506cf..734a3e6 100644
+--- a/src/ssl/ssl_e.c
++++ b/src/ssl/ssl_e.c
+@@ -210,10 +210,16 @@ flush_ssl_data(lcbio_ESSL *es)
+      * calls. While we could have done this inline with the send() call this
+      * would make future optimization more difficult. */
+     GT_WRITE_DONE:
++#if !LCB_CAN_OPTIMIZE_SSL_BIO
++    BIO_get_mem_ptr(es->wbio, &wmb);
++#endif
+     while (wmb->length > (size_t)tmp_len) {
+         char dummy[4096];
+         unsigned to_read = MINIMUM(wmb->length-tmp_len, sizeof dummy);
+         BIO_read(es->wbio, dummy, to_read);
++#if !LCB_CAN_OPTIMIZE_SSL_BIO
++        BIO_get_mem_ptr(es->wbio, &wmb);
++#endif
+     }
+     BIO_clear_retry_flags(es->wbio);
+     return 0;
+-- 
+2.23.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix b/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix
index 23b39bca1f3a..53ec231dec96 100644
--- a/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "1yfmcx65aqd5l87scha6kmm2s38n85ci3gg0h6qfs16s3jfi6bw7";
   };
 
-  cmakeFlags = "-DLCB_NO_MOCK=ON";
+  cmakeFlags = [ "-DLCB_NO_MOCK=ON" ];
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ libevent openssl ];
@@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
   # Running tests in parallel does not work
   enableParallelChecking = false;
 
+  patches = [ ./0001-Fix-timeouts-in-libcouchbase-testsuite.patch ];
+
   doCheck = !stdenv.isDarwin;
 
   meta = with stdenv.lib; {