rethinkdb: 2.3.6 -> 2.4.1, fix

Update patch that prevents making V8 snapshots, as those segfault.

Fix build by building only the database server. Other make targets fetch
dependencies at build time and this behaviour cannot be overriden.
Therefore, the clients and web interface are no longer built. See
rethinkdb/rethinkdb#6867.
This commit is contained in:
Matthias Totschnig 2020-05-14 17:55:41 +02:00 committed by Jon
parent 0466ae30ea
commit 8025e4ffe4
2 changed files with 30 additions and 11 deletions

@ -5,19 +5,15 @@
stdenv.mkDerivation rec {
pname = "rethinkdb";
version = "2.3.6";
version = "2.4.1";
src = fetchurl {
url = "https://download.rethinkdb.com/dist/${pname}-${version}.tgz";
sha256 = "0a6wlgqa2flf87jrp4fq4y9aihwyhgwclmss56z03b8hd5k5j8f4";
url = "https://download.rethinkdb.com/repository/raw/dist/${pname}-${version}.tgz";
sha256 = "5f1786c94797a0f8973597796e22545849dc214805cf1962ef76969e0b7d495b";
};
patches = [
(fetchurl {
url = "https://github.com/rethinkdb/rethinkdb/commit/871bd3705a1f29c4ab07a096d562a4b06231a97c.patch";
sha256 = "05nagixlwnq3x7441fhll5vs70pxppbsciw8qjqp660bdb5m4jm1";
})
];
# Don't make V8 snapshots, as those segfault.
patches = [ ./v8-no-snapshot.patch ];
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
@ -36,6 +32,8 @@ stdenv.mkDerivation rec {
"--lib-path=${jemalloc}/lib"
];
makeFlags = [ "rethinkdb" ];
buildInputs = [ protobuf boost zlib curl openssl icu makeWrapper ]
++ stdenv.lib.optional (!stdenv.isDarwin) jemalloc
++ stdenv.lib.optional stdenv.isDarwin libtool;
@ -58,9 +56,8 @@ stdenv.mkDerivation rec {
joins and group by, and is easy to setup and learn.
'';
homepage = "http://www.rethinkdb.com";
license = stdenv.lib.licenses.agpl3;
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice bluescreen303 ];
broken = true; # broken with openssl 1.1
};
}

@ -0,0 +1,22 @@
diff --git a/mk/support/pkg/v8.sh b/mk/support/pkg/v8.sh
index a1810cc..da2b645 100644
--- a/mk/support/pkg/v8.sh
+++ b/mk/support/pkg/v8.sh
@@ -155,7 +155,7 @@ pkg_install () {
if [[ "$arch" = "ppc64" ]]; then
arch_gypflags="$arch_gypflags -Duse_system_icu=1"
fi
- pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX GYPFLAGS="-Dwerror= $arch_gypflags" V=1
+ pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX GYPFLAGS="-Dwerror= -Dv8_use_snapshot=false $arch_gypflags" V=1
for lib in `find "$build_dir/out/$arch.$mode" -maxdepth 1 -name \*.a` `find "$build_dir/out/$arch.$mode/obj.target" -name \*.a`; do
name=`basename $lib`
cp $lib "$install_dir/lib/${name/.$arch/}"
@@ -168,7 +168,7 @@ pkg_link-flags () {
# These are the necessary libraries recommended by the docs:
# https://developers.google.com/v8/get_started#hello
if [[ "$ARCH" != "ppc64le" ]]; then
- for lib in libv8_{base,libbase,snapshot,libplatform}; do
+ for lib in libv8_{base,libbase,nosnapshot,libplatform}; do
echo "$install_dir/lib/$lib.a"
done
for lib in libicu{i18n,uc,data}; do