diff --git a/pkgs/servers/nosql/mongodb/asio-no-experimental-string-view.patch b/pkgs/servers/nosql/mongodb/asio-no-experimental-string-view.patch new file mode 100644 index 00000000000..eb5db1818fe --- /dev/null +++ b/pkgs/servers/nosql/mongodb/asio-no-experimental-string-view.patch @@ -0,0 +1,20 @@ +diff --git a/src/third_party/asio-master/asio/include/asio/detail/config.hpp b/src/third_party/asio-master/asio/include/asio/detail/config.hpp +index 7fe6a95a..ff4cc56b 100644 +--- a/src/third_party/asio-master/asio/include/asio/detail/config.hpp ++++ b/src/third_party/asio-master/asio/include/asio/detail/config.hpp +@@ -786,7 +786,6 @@ + # if (__cplusplus >= 201402) + # if __has_include() + # define ASIO_HAS_STD_STRING_VIEW 1 +-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 + # endif // __has_include() + # endif // (__cplusplus >= 201402) + # endif // defined(__clang__) +@@ -794,7 +793,6 @@ + # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) + # if (__cplusplus >= 201402) + # define ASIO_HAS_STD_STRING_VIEW 1 +-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 + # endif // (__cplusplus >= 201402) + # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) + # endif // defined(__GNUC__) diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index da4b46a69da..3f5aeb4d7da 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -58,8 +58,6 @@ in stdenv.mkDerivation rec { substituteInPlace SConstruct \ --replace "env = Environment(" "env = Environment(ENV = os.environ," '' + stdenv.lib.optionalString stdenv.isDarwin '' - substituteInPlace src/third_party/asio-master/asio/include/asio/detail/config.hpp --replace ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW ASIO_HAS_STD_STRING_VIEW - substituteInPlace src/third_party/mozjs-45/extract/js/src/jsmath.cpp --replace 'defined(HAVE_SINCOS)' 0 substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder diff --git a/pkgs/servers/nosql/mongodb/v3_6.nix b/pkgs/servers/nosql/mongodb/v3_6.nix index 8da901c00c5..68f83631c80 100644 --- a/pkgs/servers/nosql/mongodb/v3_6.nix +++ b/pkgs/servers/nosql/mongodb/v3_6.nix @@ -11,5 +11,6 @@ let in buildMongoDB { version = "3.6.13"; sha256 = "1mbvk4bmabrswjdm01jssxcygjpq5799zqyx901nsi12vlcymwg4"; - patches = [ ./forget-build-dependencies.patch ]; + patches = [ ./forget-build-dependencies.patch ] + ++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ]; } diff --git a/pkgs/servers/nosql/mongodb/v4_0.nix b/pkgs/servers/nosql/mongodb/v4_0.nix index 95606317f31..51ce1e25062 100644 --- a/pkgs/servers/nosql/mongodb/v4_0.nix +++ b/pkgs/servers/nosql/mongodb/v4_0.nix @@ -9,8 +9,9 @@ let inherit cctools; }; in buildMongoDB { - version = "4.0.11"; - sha256 = "0kry8kzzpah0l7j8xa333y1ixwvarc28ip3f6lx5590yy11j8ry2"; + version = "4.0.12"; + sha256 = "1j8dqa4jr623y87jrdanyib9r7x18srrvdx952q4azcc8zrdwci1"; patches = - [ ./forget-build-dependencies.patch ./mozjs-45_fix-3-byte-opcode.patch ]; + [ ./forget-build-dependencies.patch ./mozjs-45_fix-3-byte-opcode.patch ] + ++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ]; }