2021-01-15 08:07:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, which, m4
|
2015-10-20 03:40:55 +02:00
|
|
|
, protobuf, boost, zlib, curl, openssl, icu, jemalloc, libtool
|
2016-11-09 16:08:35 +01:00
|
|
|
, python2Packages, makeWrapper
|
2015-07-27 22:06:00 +02:00
|
|
|
}:
|
2013-11-08 23:45:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "rethinkdb";
|
2020-05-14 17:55:41 +02:00
|
|
|
version = "2.4.1";
|
2013-11-08 23:45:57 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-05-14 17:55:41 +02:00
|
|
|
url = "https://download.rethinkdb.com/repository/raw/dist/${pname}-${version}.tgz";
|
|
|
|
sha256 = "5f1786c94797a0f8973597796e22545849dc214805cf1962ef76969e0b7d495b";
|
2013-11-08 23:45:57 +01:00
|
|
|
};
|
|
|
|
|
2021-01-15 08:07:56 +01:00
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
2015-10-20 03:40:55 +02:00
|
|
|
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 23:45:57 +01:00
|
|
|
preConfigure = ''
|
|
|
|
export ALLOW_WARNINGS=1
|
2015-01-08 10:26:49 +01:00
|
|
|
patchShebangs .
|
2013-11-08 23:45:57 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-15 08:07:56 +01:00
|
|
|
configureFlags = lib.optionals (!stdenv.isDarwin) [
|
2015-07-27 22:06:00 +02:00
|
|
|
"--with-jemalloc"
|
|
|
|
"--lib-path=${jemalloc}/lib"
|
|
|
|
];
|
2013-11-08 23:45:57 +01:00
|
|
|
|
2020-05-14 17:55:41 +02:00
|
|
|
makeFlags = [ "rethinkdb" ];
|
|
|
|
|
2016-08-31 13:31:04 +02:00
|
|
|
buildInputs = [ protobuf boost zlib curl openssl icu makeWrapper ]
|
2021-01-15 08:07:56 +01:00
|
|
|
++ lib.optional (!stdenv.isDarwin) jemalloc
|
|
|
|
++ lib.optional stdenv.isDarwin libtool;
|
2013-11-08 23:45:57 +01:00
|
|
|
|
2016-11-09 16:08:35 +01:00
|
|
|
nativeBuildInputs = [ which m4 python2Packages.python ];
|
2013-11-08 23:45:57 +01:00
|
|
|
|
2015-07-27 22:06:00 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-08-31 13:31:04 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/rethinkdb \
|
2016-11-09 16:08:35 +01:00
|
|
|
--prefix PATH ":" "${python2Packages.rethinkdb}/bin"
|
2016-08-31 13:31:04 +02:00
|
|
|
'';
|
|
|
|
|
2013-11-08 23:45:57 +01:00
|
|
|
meta = {
|
|
|
|
description = "An open-source distributed database built with love";
|
|
|
|
longDescription = ''
|
2015-09-16 01:03:30 +02: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 23:45:57 +01:00
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.rethinkdb.com";
|
2021-01-15 08:07:56 +01:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice bluescreen303 ];
|
2013-11-08 23:45:57 +01:00
|
|
|
};
|
|
|
|
}
|