2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, which, m4
|
2023-07-15 17:15:38 +00:00
|
|
|
, protobuf, boost, zlib, curl, openssl, icu, jemalloc, libtool
|
|
|
|
, python3Packages, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rethinkdb";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.4.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-09-25 04:45:31 +00:00
|
|
|
url = "https://download.rethinkdb.com/repository/raw/dist/${pname}-${version}.tgz";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-w3iMeicPu0nj2kV4e2vlAHY8GQ+wWeObfe+UVPmkZ08=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace external/quickjs_*/Makefile \
|
|
|
|
--replace "gcc-ar" "${stdenv.cc.targetPrefix}ar" \
|
|
|
|
--replace "gcc" "${stdenv.cc.targetPrefix}cc"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export ALLOW_WARNINGS=1
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
configureFlags = lib.optionals (!stdenv.isDarwin) [
|
2020-04-24 23:36:52 +00:00
|
|
|
"--with-jemalloc"
|
|
|
|
"--lib-path=${jemalloc}/lib"
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
makeFlags = [ "rethinkdb" ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ protobuf boost zlib curl openssl icu ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional (!stdenv.isDarwin) jemalloc
|
|
|
|
++ lib.optional stdenv.isDarwin libtool;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ which m4 python3Packages.python makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/rethinkdb \
|
2023-07-15 17:15:38 +00:00
|
|
|
--prefix PATH ":" "${python3Packages.rethinkdb}/bin"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An open-source distributed database built with love";
|
|
|
|
longDescription = ''
|
|
|
|
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.
|
|
|
|
'';
|
2022-01-07 04:07:37 +00:00
|
|
|
homepage = "https://rethinkdb.com";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.asl20;
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice bluescreen303 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|