From dbd0f3e957e6327c736ae030d763368efb1c5254 Mon Sep 17 00:00:00 2001 From: Peter Woodman Date: Tue, 7 Jul 2020 14:53:31 -0400 Subject: mongodb: 4.0.12 -> 4.2.8 Not strictly an upgrade, but adds a new mongodb-4_2 target with the current mongodb from that branch. Use matching client and server versions in mongodb tests- tests were using the mongo 3.4 client to connect, and this finally doesn't work with server 4.2. Per reviewer suggestion, adding myself as cheetah3 maintainer. Additionally, reestore comments describing the purpose of the build-dependencies patch --- pkgs/servers/nosql/mongodb/mongodb.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'pkgs/servers/nosql/mongodb/mongodb.nix') diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index 2c058edbcca..9bf856e11b4 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, scons, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp -, sasl, openssl, libpcap, python27, curl, Security, CoreFoundation, cctools }: +, sasl, openssl, libpcap, python27, python38, curl, Security, CoreFoundation, cctools }: # Note: # The command line tools are written in Go as part of a different package (mongodb-tools) @@ -11,6 +11,17 @@ with stdenv.lib; }@args: let + variants = if versionAtLeast version "4.2" + then { python = python38.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]); + scons = scons; + mozjsVersion = "60"; + mozjsReplace = "defined(HAVE___SINCOS)"; + } + else { python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]); + scons = scons.py2; + mozjsVersion = "45"; + mozjsReplace = "defined(HAVE_SINCOS)"; + }; python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]); system-libraries = [ "boost" @@ -34,7 +45,7 @@ in stdenv.mkDerivation rec { inherit sha256; }; - nativeBuildInputs = [ scons.py2 ]; + nativeBuildInputs = [ variants.scons ]; buildInputs = [ boost curl @@ -43,7 +54,7 @@ in stdenv.mkDerivation rec { libyamlcpp openssl pcre-cpp - python + variants.python sasl snappy zlib @@ -59,7 +70,7 @@ in stdenv.mkDerivation rec { substituteInPlace SConstruct \ --replace "env = Environment(" "env = Environment(ENV = os.environ," '' + stdenv.lib.optionalString stdenv.isDarwin '' - substituteInPlace src/third_party/mozjs-45/extract/js/src/jsmath.cpp --replace 'defined(HAVE_SINCOS)' 0 + substituteInPlace src/third_party/mozjs-${variants.mozjsVersion}/extract/js/src/jsmath.cpp --replace '${variants.mozjsReplace}' 0 substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder -- cgit 1.4.1