summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorMatthias Totschnig <matthias@totschnig.org>2020-05-14 17:55:41 +0200
committerJon <jonringer@users.noreply.github.com>2020-08-21 15:44:52 -0700
commit8025e4ffe445d97eb9377e4d66441cebcca65ca0 (patch)
treef96e74a0fb69392654a866ec425f7073cd82ff81 /pkgs/servers
parent0466ae30ea68617641a2cb0d0a35bb2b3f5f7921 (diff)
downloadnixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.tar
nixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.tar.gz
nixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.tar.bz2
nixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.tar.lz
nixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.tar.xz
nixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.tar.zst
nixpkgs-8025e4ffe445d97eb9377e4d66441cebcca65ca0.zip
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.
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/nosql/rethinkdb/default.nix19
-rw-r--r--pkgs/servers/nosql/rethinkdb/v8-no-snapshot.patch22
2 files changed, 30 insertions, 11 deletions
diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix
index 46a23ed2529..80d287699ac 100644
--- a/pkgs/servers/nosql/rethinkdb/default.nix
+++ b/pkgs/servers/nosql/rethinkdb/default.nix
@@ -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
   };
 }
diff --git a/pkgs/servers/nosql/rethinkdb/v8-no-snapshot.patch b/pkgs/servers/nosql/rethinkdb/v8-no-snapshot.patch
new file mode 100644
index 00000000000..e9ef5438d6b
--- /dev/null
+++ b/pkgs/servers/nosql/rethinkdb/v8-no-snapshot.patch
@@ -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