diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libcouchbase')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch | 36 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libcouchbase/default.nix | 4 |
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; { |