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
This commit is contained in:
parent
1c26e6baec
commit
dbd0f3e957
10 changed files with 131 additions and 5 deletions
|
@ -6316,6 +6316,12 @@
|
||||||
githubId = 119460;
|
githubId = 119460;
|
||||||
name = "Perry Barnoy";
|
name = "Perry Barnoy";
|
||||||
};
|
};
|
||||||
|
pjjw = {
|
||||||
|
email = "peter@shortbus.org";
|
||||||
|
github = "pjjw";
|
||||||
|
githubId = 638;
|
||||||
|
name = "Peter Woodman";
|
||||||
|
};
|
||||||
pjones = {
|
pjones = {
|
||||||
email = "pjones@devalot.com";
|
email = "pjones@devalot.com";
|
||||||
github = "pjones";
|
github = "pjones";
|
||||||
|
|
|
@ -15,7 +15,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
node.wait_for_open_port(27017)
|
node.wait_for_open_port(27017)
|
||||||
|
|
||||||
assert "hello" in node.succeed(
|
assert "hello" in node.succeed(
|
||||||
"mongo ${testQuery}"
|
"${pkg}/bin/mongo ${testQuery}"
|
||||||
)
|
)
|
||||||
|
|
||||||
node.execute(
|
node.execute(
|
||||||
|
@ -36,6 +36,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
mongodb-3_4
|
mongodb-3_4
|
||||||
mongodb-3_6
|
mongodb-3_6
|
||||||
mongodb-4_0
|
mongodb-4_0
|
||||||
|
mongodb-4_2
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -46,6 +47,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
+ runMongoDBTest pkgs.mongodb-3_4
|
+ runMongoDBTest pkgs.mongodb-3_4
|
||||||
+ runMongoDBTest pkgs.mongodb-3_6
|
+ runMongoDBTest pkgs.mongodb-3_6
|
||||||
+ runMongoDBTest pkgs.mongodb-4_0
|
+ runMongoDBTest pkgs.mongodb-4_0
|
||||||
|
+ runMongoDBTest pkgs.mongodb-4_2
|
||||||
+ ''
|
+ ''
|
||||||
node.shutdown()
|
node.shutdown()
|
||||||
'';
|
'';
|
||||||
|
|
20
pkgs/development/python-modules/cheetah3/default.nix
Normal file
20
pkgs/development/python-modules/cheetah3/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ lib, buildPythonPackage, fetchPypi, stdenv }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "Cheetah3";
|
||||||
|
version = "3.2.5";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "ececc9ca7c58b9a86ce71eb95594c4619949e2a058d2a1af74c7ae8222515eb1";
|
||||||
|
};
|
||||||
|
|
||||||
|
doCheck = false; # Circular dependency
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://www.cheetahtemplate.org/";
|
||||||
|
description = "A template engine and code generation tool";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ pjjw ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
--- a/src/third_party/asio-master/asio/include/asio/detail/config.hpp
|
||||||
|
+++ b/src/third_party/asio-master/asio/include/asio/detail/config.hpp
|
||||||
|
@@ -831,20 +831,8 @@
|
||||||
|
# endif // (__cplusplus >= 201402)
|
||||||
|
# endif // (_LIBCPP_VERSION < 7000)
|
||||||
|
# else // defined(ASIO_HAS_CLANG_LIBCXX)
|
||||||
|
-# if (__cplusplus >= 201402)
|
||||||
|
-# if __has_include(<experimental/string_view>)
|
||||||
|
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
|
||||||
|
-# endif // __has_include(<experimental/string_view>)
|
||||||
|
-# endif // (__cplusplus >= 201402)
|
||||||
|
# endif // // defined(ASIO_HAS_CLANG_LIBCXX)
|
||||||
|
# endif // defined(__clang__)
|
||||||
|
-# if defined(__GNUC__)
|
||||||
|
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
|
||||||
|
-# if (__cplusplus >= 201402)
|
||||||
|
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
|
||||||
|
-# endif // (__cplusplus >= 201402)
|
||||||
|
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
|
||||||
|
-# endif // defined(__GNUC__)
|
||||||
|
# endif // !defined(ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
|
||||||
|
#endif // !defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
|
|
@ -0,0 +1,36 @@
|
||||||
|
# MongoDB keeps track of its build parameters, which tricks nix into
|
||||||
|
# keeping dependencies to build inputs in the final output.
|
||||||
|
# We remove the build flags from buildInfo data.
|
||||||
|
--- a/site_scons/mongo/generators.py
|
||||||
|
+++ b/site_scons/mongo/generators.py
|
||||||
|
@@ -33,30 +33,12 @@ def default_buildinfo_environment_data():
|
||||||
|
True,
|
||||||
|
False,
|
||||||
|
),
|
||||||
|
- (
|
||||||
|
- 'ccflags',
|
||||||
|
- '$CCFLAGS',
|
||||||
|
- True,
|
||||||
|
- False,
|
||||||
|
- ),
|
||||||
|
(
|
||||||
|
'cxx',
|
||||||
|
'$CXX_VERSION',
|
||||||
|
True,
|
||||||
|
False,
|
||||||
|
),
|
||||||
|
- (
|
||||||
|
- 'cxxflags',
|
||||||
|
- '$CXXFLAGS',
|
||||||
|
- True,
|
||||||
|
- False,
|
||||||
|
- ),
|
||||||
|
- (
|
||||||
|
- 'linkflags',
|
||||||
|
- '$LINKFLAGS',
|
||||||
|
- True,
|
||||||
|
- False,
|
||||||
|
- ),
|
||||||
|
(
|
||||||
|
'target_arch',
|
||||||
|
'$TARGET_ARCH',
|
|
@ -1,3 +1,6 @@
|
||||||
|
# MongoDB keeps track of its build parameters, which tricks nix into
|
||||||
|
# keeping dependencies to build inputs in the final output.
|
||||||
|
# We remove the build flags from buildInfo data.
|
||||||
--- a/site_scons/mongo/generators.py
|
--- a/site_scons/mongo/generators.py
|
||||||
+++ b/site_scons/mongo/generators.py
|
+++ b/site_scons/mongo/generators.py
|
||||||
@@ -18,10 +18,7 @@ def default_buildinfo_environment_data():
|
@@ -18,10 +18,7 @@ def default_buildinfo_environment_data():
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, scons, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
|
{ 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:
|
# Note:
|
||||||
# The command line tools are written in Go as part of a different package (mongodb-tools)
|
# The command line tools are written in Go as part of a different package (mongodb-tools)
|
||||||
|
@ -11,6 +11,17 @@ with stdenv.lib;
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
let
|
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 ]);
|
python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
|
||||||
system-libraries = [
|
system-libraries = [
|
||||||
"boost"
|
"boost"
|
||||||
|
@ -34,7 +45,7 @@ in stdenv.mkDerivation rec {
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ scons.py2 ];
|
nativeBuildInputs = [ variants.scons ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
curl
|
curl
|
||||||
|
@ -43,7 +54,7 @@ in stdenv.mkDerivation rec {
|
||||||
libyamlcpp
|
libyamlcpp
|
||||||
openssl
|
openssl
|
||||||
pcre-cpp
|
pcre-cpp
|
||||||
python
|
variants.python
|
||||||
sasl
|
sasl
|
||||||
snappy
|
snappy
|
||||||
zlib
|
zlib
|
||||||
|
@ -59,7 +70,7 @@ in stdenv.mkDerivation rec {
|
||||||
substituteInPlace SConstruct \
|
substituteInPlace SConstruct \
|
||||||
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
|
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
'' + 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/s1angle.cc --replace drem remainder
|
||||||
substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder
|
substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder
|
||||||
|
|
17
pkgs/servers/nosql/mongodb/v4_2.nix
Normal file
17
pkgs/servers/nosql/mongodb/v4_2.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }:
|
||||||
|
|
||||||
|
let
|
||||||
|
buildMongoDB = callPackage ./mongodb.nix {
|
||||||
|
inherit sasl;
|
||||||
|
inherit boost;
|
||||||
|
inherit Security;
|
||||||
|
inherit CoreFoundation;
|
||||||
|
inherit cctools;
|
||||||
|
};
|
||||||
|
in buildMongoDB {
|
||||||
|
version = "4.2.8";
|
||||||
|
sha256 = "13yvhi1258skdni00bh6ph609whqsmhiimhyqy1gs2liwdvh5278";
|
||||||
|
patches =
|
||||||
|
[ ./forget-build-dependencies-4-2.patch ]
|
||||||
|
++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view-4-2.patch ];
|
||||||
|
}
|
|
@ -16257,6 +16257,13 @@ in
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mongodb-4_2 = callPackage ../servers/nosql/mongodb/v4_2.nix {
|
||||||
|
sasl = cyrus_sasl;
|
||||||
|
boost = boost169;
|
||||||
|
inherit (darwin) cctools;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
||||||
|
};
|
||||||
|
|
||||||
nginx-sso = callPackage ../servers/nginx-sso { };
|
nginx-sso = callPackage ../servers/nginx-sso { };
|
||||||
|
|
||||||
percona-server56 = callPackage ../servers/sql/percona/5.6.x.nix { };
|
percona-server56 = callPackage ../servers/sql/percona/5.6.x.nix { };
|
||||||
|
|
|
@ -2301,6 +2301,8 @@ in {
|
||||||
|
|
||||||
cheetah = callPackage ../development/python-modules/cheetah { };
|
cheetah = callPackage ../development/python-modules/cheetah { };
|
||||||
|
|
||||||
|
cheetah3 = callPackage ../development/python-modules/cheetah3 { };
|
||||||
|
|
||||||
cherrypy = if isPy3k then
|
cherrypy = if isPy3k then
|
||||||
callPackage ../development/python-modules/cherrypy { }
|
callPackage ../development/python-modules/cherrypy { }
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue