2015-07-27 21:06:00 +01:00
|
|
|
{ stdenv, fetchurl, which, m4, python
|
2015-10-20 02:40:55 +01:00
|
|
|
, protobuf, boost, zlib, curl, openssl, icu, jemalloc, libtool
|
2016-08-31 12:31:04 +01:00
|
|
|
, pythonPackages, makeWrapper
|
2015-07-27 21:06:00 +01:00
|
|
|
}:
|
2013-11-08 22:45:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-04-14 18:58:14 +01:00
|
|
|
name = "rethinkdb-${version}";
|
2016-08-31 12:31:04 +01:00
|
|
|
version = "2.3.5";
|
2013-11-08 22:45:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-06-11 20:31:42 +01:00
|
|
|
url = "https://download.rethinkdb.com/dist/${name}.tgz";
|
2016-08-31 12:31:04 +01:00
|
|
|
sha256 = "047fz3r0rn95mqr5p1xfdprf0hq4avq2a1q8zsdifxxid7hyx2nx";
|
2013-11-08 22:45:57 +00:00
|
|
|
};
|
|
|
|
|
2015-10-20 02:40:55 +01:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' external/v8_3.30.33.16/build/gyp/pylib/gyp/xcode_emulation.py
|
|
|
|
|
|
|
|
# very meta
|
|
|
|
substituteInPlace mk/support/pkg/re2.sh --replace "-i '''" "-i"
|
|
|
|
'';
|
|
|
|
|
2013-11-08 22:45:57 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export ALLOW_WARNINGS=1
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs .
|
2013-11-08 22:45:57 +00:00
|
|
|
'';
|
|
|
|
|
2015-10-20 02:40:55 +01:00
|
|
|
configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [
|
2015-07-27 21:06:00 +01:00
|
|
|
"--with-jemalloc"
|
|
|
|
"--lib-path=${jemalloc}/lib"
|
|
|
|
];
|
2013-11-08 22:45:57 +00:00
|
|
|
|
2016-08-31 12:31:04 +01:00
|
|
|
buildInputs = [ protobuf boost zlib curl openssl icu makeWrapper ]
|
2015-10-20 02:40:55 +01:00
|
|
|
++ stdenv.lib.optional (!stdenv.isDarwin) jemalloc
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin libtool;
|
2013-11-08 22:45:57 +00:00
|
|
|
|
2014-04-26 19:15:28 +01:00
|
|
|
nativeBuildInputs = [ which m4 python ];
|
2013-11-08 22:45:57 +00:00
|
|
|
|
2015-07-27 21:06:00 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-08-31 12:31:04 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/rethinkdb \
|
|
|
|
--prefix PATH ":" "${pythonPackages.rethinkdb}/bin"
|
|
|
|
'';
|
|
|
|
|
2013-11-08 22:45:57 +00:00
|
|
|
meta = {
|
|
|
|
description = "An open-source distributed database built with love";
|
|
|
|
longDescription = ''
|
2015-09-16 00:03:30 +01:00
|
|
|
RethinkDB is built to store JSON documents, and scale to
|
|
|
|
multiple machines with very little effort. It has a pleasant
|
|
|
|
query language that supports really useful queries like table
|
|
|
|
joins and group by, and is easy to setup and learn.
|
2013-11-08 22:45:57 +00:00
|
|
|
'';
|
2015-09-16 00:03:30 +01:00
|
|
|
homepage = http://www.rethinkdb.com;
|
|
|
|
license = stdenv.lib.licenses.agpl3;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice bluescreen303 ];
|
2013-11-08 22:45:57 +00:00
|
|
|
};
|
|
|
|
}
|