2014-01-17 00:30:16 +00:00
|
|
|
{ stdenv, fetchurl, erlang, icu, openssl, spidermonkey, curl, help2man, python
|
|
|
|
, sphinx, which, file, pkgconfig, getopt }:
|
2009-11-05 14:41:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-01-17 00:30:16 +00:00
|
|
|
name = "couchdb-${version}";
|
2014-10-06 21:03:42 +01:00
|
|
|
version = "1.6.1";
|
2014-01-17 00:30:16 +00:00
|
|
|
|
2009-11-05 14:41:05 +00:00
|
|
|
src = fetchurl {
|
2014-06-01 15:01:22 +01:00
|
|
|
url = "mirror://apache/couchdb/source/${version}/apache-${name}.tar.gz";
|
2014-10-06 21:03:42 +01:00
|
|
|
sha256 = "09w6ijj9l5jzh81nvc3hrlqp345ajg3haj353g9kxkik6wbinq2s";
|
2009-11-05 14:41:05 +00:00
|
|
|
};
|
|
|
|
|
2014-06-01 15:01:22 +01:00
|
|
|
buildInputs = [ erlang icu openssl spidermonkey curl help2man sphinx which
|
|
|
|
file pkgconfig ];
|
2009-11-05 14:41:05 +00:00
|
|
|
|
2015-01-16 07:51:22 +00:00
|
|
|
/* 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
|
|
|
|
'';
|
|
|
|
|
2009-11-06 14:50:41 +00:00
|
|
|
postInstall = ''
|
|
|
|
sed -i -e "s|\`getopt|\`${getopt}/bin/getopt|" $out/bin/couchdb
|
|
|
|
'';
|
2011-12-15 12:24:25 +00:00
|
|
|
|
2014-01-17 00:30:16 +00:00
|
|
|
/*
|
|
|
|
Versions of SpiderMonkey after the js185-1.0.0 release remove the optional
|
|
|
|
enforcement of preventing anonymous functions in a statement context. This
|
|
|
|
will most likely break your existing JavaScript code as well as render all
|
|
|
|
example code invalid.
|
2009-11-05 14:41:05 +00:00
|
|
|
|
2014-01-17 00:30:16 +00:00
|
|
|
If you wish to ignore this error pass --enable-js-trunk to ./configure.
|
|
|
|
*/
|
|
|
|
configureFlags = ''
|
|
|
|
--enable-js-trunk
|
|
|
|
'';
|
|
|
|
|
2016-01-20 16:50:15 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://couchdb.apache.org;
|
2016-01-20 16:50:15 +00:00
|
|
|
license = licenses.asl20;
|
2016-08-02 15:41:28 +01:00
|
|
|
platforms = platforms.all;
|
2016-01-20 16:50:15 +00:00
|
|
|
maintainers = with maintainers; [ garbas ];
|
2014-01-17 00:30:16 +00:00
|
|
|
};
|
2009-11-05 14:41:05 +00:00
|
|
|
}
|