summary refs log tree commit diff
path: root/pkgs/servers/http/couchdb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/couchdb/default.nix')
-rw-r--r--pkgs/servers/http/couchdb/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/servers/http/couchdb/default.nix b/pkgs/servers/http/couchdb/default.nix
index 0b5244a5974..54412d2ab40 100644
--- a/pkgs/servers/http/couchdb/default.nix
+++ b/pkgs/servers/http/couchdb/default.nix
@@ -3,16 +3,28 @@
 
 stdenv.mkDerivation rec {
   name = "couchdb-${version}";
-  version = "1.6.0";
+  version = "1.6.1";
 
   src = fetchurl {
     url = "mirror://apache/couchdb/source/${version}/apache-${name}.tar.gz";
-    sha256 = "0m4k7i3gibzzcabssysv42rmdr89myppc6765xr0jggwkwdxgxmx";
+    sha256 = "09w6ijj9l5jzh81nvc3hrlqp345ajg3haj353g9kxkik6wbinq2s";
   };
 
   buildInputs = [ erlang icu openssl spidermonkey curl help2man sphinx which
     file pkgconfig ];
 
+  /* This patch removes the `-Werror` flag as there are warnings due to
+   * _BSD_SOURCE being deprecated in glibc >= 2.20
+   */
+  patchPhase = ''
+    patch src/couchdb/priv/Makefile.in <<EOF
+    392c392
+    < couchjs_CFLAGS = -g -Wall -Werror -D_BSD_SOURCE \$(CURL_CFLAGS) \$(JS_CFLAGS)
+    ---
+    > couchjs_CFLAGS = -g -Wall -D_BSD_SOURCE \$(CURL_CFLAGS) \$(JS_CFLAGS)
+    EOF
+  '';
+
   postInstall = ''
     sed -i -e "s|\`getopt|\`${getopt}/bin/getopt|" $out/bin/couchdb
   '';