diff --git a/pkgs/servers/http/couchdb/default.nix b/pkgs/servers/http/couchdb/default.nix index 0e7146175446..54412d2ab400 100644 --- a/pkgs/servers/http/couchdb/default.nix +++ b/pkgs/servers/http/couchdb/default.nix @@ -13,6 +13,18 @@ stdenv.mkDerivation rec { 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 < couchjs_CFLAGS = -g -Wall -D_BSD_SOURCE \$(CURL_CFLAGS) \$(JS_CFLAGS) + EOF + ''; + postInstall = '' sed -i -e "s|\`getopt|\`${getopt}/bin/getopt|" $out/bin/couchdb '';