1{
2 stdenv,
3 callPackage,
4 sasl,
5 boost,
6 cctools,
7 avxSupport ? stdenv.hostPlatform.avxSupport,
8 nixosTests,
9 lib,
10}:
11
12let
13 buildMongoDB = callPackage ./mongodb.nix {
14 inherit
15 sasl
16 boost
17 cctools
18 stdenv
19 ;
20 };
21in
22buildMongoDB {
23 inherit avxSupport;
24 version = "7.0.22";
25 sha256 = "sha256-Je4vPG8tz1vqCEXzWyYi5KWQaxzlH0hOKSpWBgPs0Hs=";
26 patches = [
27 # ModuleNotFoundError: No module named 'mongo_tooling_metrics':
28 # NameError: name 'SConsToolingMetrics' is not defined:
29 # The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=gold'.
30 ./mongodb7-SConstruct.patch
31
32 # Fix building with python 3.12 since the imp module was removed
33 ./mongodb-python312.patch
34
35 # mongodb-7_0's mozjs uses avx2 instructions
36 # https://github.com/GermanAizek/mongodb-without-avx/issues/16
37 ]
38 ++ lib.optionals (!avxSupport) [ ./mozjs-noavx.patch ];
39
40 passthru.tests = {
41 inherit (nixosTests) mongodb;
42 };
43}