mongodb-7_0: init at 7.0.14
This commit is contained in:
parent
27e7407149
commit
8315dc67e2
37
pkgs/servers/nosql/mongodb/7.0.nix
Normal file
37
pkgs/servers/nosql/mongodb/7.0.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
stdenv,
|
||||
callPackage,
|
||||
sasl,
|
||||
boost,
|
||||
Security,
|
||||
CoreFoundation,
|
||||
cctools,
|
||||
avxSupport ? stdenv.hostPlatform.avxSupport,
|
||||
}:
|
||||
|
||||
let
|
||||
buildMongoDB = callPackage ./mongodb.nix {
|
||||
inherit
|
||||
sasl
|
||||
boost
|
||||
Security
|
||||
CoreFoundation
|
||||
cctools
|
||||
stdenv
|
||||
;
|
||||
};
|
||||
in
|
||||
buildMongoDB {
|
||||
inherit avxSupport;
|
||||
version = "7.0.14";
|
||||
sha256 = "sha256-3NUv/Rr6V0rH6zHCXJwHZ7ZQOqMJvYGessNVemUF6g0=";
|
||||
patches = [
|
||||
# ModuleNotFoundError: No module named 'mongo_tooling_metrics':
|
||||
# NameError: name 'SConsToolingMetrics' is not defined:
|
||||
# The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=gold'.
|
||||
./mongodb7-SConstruct.patch
|
||||
|
||||
# Fix building with python 3.12 since the imp module was removed
|
||||
./mongodb-python312.patch
|
||||
];
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
, buildPackages
|
||||
, boost
|
||||
, gperftools
|
||||
, pcre2
|
||||
, pcre-cpp
|
||||
, snappy
|
||||
, zlib
|
||||
@ -48,7 +49,6 @@ let
|
||||
|
||||
system-libraries = [
|
||||
"boost"
|
||||
"pcre"
|
||||
"snappy"
|
||||
"yaml"
|
||||
"zlib"
|
||||
@ -56,7 +56,13 @@ let
|
||||
#"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs).
|
||||
#"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source.
|
||||
#"wiredtiger"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [ "tcmalloc" ];
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [ "tcmalloc" ]
|
||||
++ lib.optionals (lib.versionOlder version "7.0") [
|
||||
"pcre"
|
||||
]
|
||||
++ lib.optionals (lib.versionAtLeast version "7.0") [
|
||||
"pcre2"
|
||||
];
|
||||
inherit (lib) systems subtractLists;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
@ -83,6 +89,7 @@ in stdenv.mkDerivation rec {
|
||||
yaml-cpp
|
||||
openssl
|
||||
openldap
|
||||
pcre2
|
||||
pcre-cpp
|
||||
sasl
|
||||
snappy
|
||||
|
63
pkgs/servers/nosql/mongodb/mongodb7-SConstruct.patch
Normal file
63
pkgs/servers/nosql/mongodb/mongodb7-SConstruct.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 07579349b83..68a26f26a49 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -23,7 +23,6 @@ from pkg_resources import parse_version
|
||||
|
||||
import SCons
|
||||
import SCons.Script
|
||||
-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
|
||||
from site_scons.mongo import build_profiles
|
||||
|
||||
# This must be first, even before EnsureSConsVersion, if
|
||||
@@ -1653,16 +1652,6 @@ env = Environment(variables=env_vars, **envDict)
|
||||
del envDict
|
||||
env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption')
|
||||
|
||||
-# The placement of this is intentional. Here we setup an atexit method to store tooling metrics.
|
||||
-# We should only register this function after env, env_vars and the parser have been properly initialized.
|
||||
-SConsToolingMetrics.register_metrics(
|
||||
- utc_starttime=datetime.utcnow(),
|
||||
- artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
|
||||
- env_vars=env_vars,
|
||||
- env=env,
|
||||
- parser=_parser,
|
||||
-)
|
||||
-
|
||||
if get_option('build-metrics'):
|
||||
env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR'
|
||||
env.Tool('build_metrics')
|
||||
@@ -3549,33 +3538,6 @@ def doConfigure(myenv):
|
||||
myenv.AddMethod(
|
||||
functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported")
|
||||
|
||||
- if myenv.ToolchainIs('gcc', 'clang'):
|
||||
- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker
|
||||
- # because it is much faster. Don't use it if the user has already configured another linker
|
||||
- # selection manually.
|
||||
- if any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']):
|
||||
- myenv.FatalError(
|
||||
- f"Use the '--linker' option instead of modifying the LINKFLAGS directly.")
|
||||
-
|
||||
- linker_ld = get_option('linker')
|
||||
- if linker_ld == 'auto':
|
||||
- if not env.TargetOSIs('darwin', 'macOS'):
|
||||
- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
|
||||
- myenv.FatalError(
|
||||
- f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=gold'."
|
||||
- )
|
||||
- elif link_model.startswith("dynamic") and linker_ld == 'bfd':
|
||||
- # BFD is not supported due to issues with it causing warnings from some of
|
||||
- # the third party libraries that mongodb is linked with:
|
||||
- # https://jira.mongodb.org/browse/SERVER-49465
|
||||
- myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.")
|
||||
- else:
|
||||
- if not myenv.AddToLINKFLAGSIfSupported(f'-fuse-ld={linker_ld}'):
|
||||
- myenv.FatalError(f"Linker {linker_ld} could not be configured.")
|
||||
-
|
||||
- if has_option('gcov') and myenv.AddToCCFLAGSIfSupported('-fprofile-update=single'):
|
||||
- myenv.AppendUnique(LINKFLAGS=['-fprofile-update=single'])
|
||||
-
|
||||
detectCompiler = Configure(
|
||||
myenv,
|
||||
help=False,
|
@ -25034,6 +25034,19 @@ with pkgs;
|
||||
if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
||||
};
|
||||
|
||||
mongodb-7_0 = darwin.apple_sdk_11_0.callPackage ../servers/nosql/mongodb/7.0.nix {
|
||||
sasl = cyrus_sasl;
|
||||
boost = boost179.override { enableShared = false; };
|
||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
||||
stdenv = if stdenv.hostPlatform.isDarwin then
|
||||
darwin.apple_sdk_11_0.stdenv.override (old: {
|
||||
hostPlatform = old.hostPlatform // { darwinMinVersion = "10.14"; };
|
||||
buildPlatform = old.buildPlatform // { darwinMinVersion = "10.14"; };
|
||||
targetPlatform = old.targetPlatform // { darwinMinVersion = "10.14"; };
|
||||
}) else
|
||||
if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
|
||||
};
|
||||
|
||||
immudb = callPackage ../servers/nosql/immudb { };
|
||||
|
||||
influxdb = callPackage ../servers/nosql/influxdb { };
|
||||
|
Loading…
Reference in New Issue
Block a user