2024-07-14 16:16:23 -04:00
|
|
|
{
|
|
|
|
|
stdenv,
|
|
|
|
|
callPackage,
|
|
|
|
|
sasl,
|
|
|
|
|
boost,
|
|
|
|
|
cctools,
|
|
|
|
|
avxSupport ? stdenv.hostPlatform.avxSupport,
|
2024-10-01 01:27:51 +01:00
|
|
|
nixosTests,
|
2024-10-07 07:20:47 -04:00
|
|
|
lib,
|
2024-07-14 16:16:23 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
buildMongoDB = callPackage ./mongodb.nix {
|
|
|
|
|
inherit
|
|
|
|
|
sasl
|
|
|
|
|
boost
|
|
|
|
|
cctools
|
|
|
|
|
stdenv
|
|
|
|
|
;
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
buildMongoDB {
|
|
|
|
|
inherit avxSupport;
|
2025-07-20 12:18:39 -04:00
|
|
|
version = "7.0.22";
|
|
|
|
|
sha256 = "sha256-Je4vPG8tz1vqCEXzWyYi5KWQaxzlH0hOKSpWBgPs0Hs=";
|
2024-07-14 16:16:23 -04:00
|
|
|
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
|
2024-10-07 07:20:47 -04:00
|
|
|
|
|
|
|
|
# mongodb-7_0's mozjs uses avx2 instructions
|
|
|
|
|
# https://github.com/GermanAizek/mongodb-without-avx/issues/16
|
|
|
|
|
]
|
|
|
|
|
++ lib.optionals (!avxSupport) [ ./mozjs-noavx.patch ];
|
|
|
|
|
|
2024-10-01 01:27:51 +01:00
|
|
|
passthru.tests = {
|
|
|
|
|
inherit (nixosTests) mongodb;
|
|
|
|
|
};
|
2024-07-14 16:16:23 -04:00
|
|
|
}
|