about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2022-10-11 04:32:40 +0200
committerGitHub <noreply@github.com>2022-10-11 04:32:40 +0200
commitf010d3721eacf7485b56bdc0c3923755f65a3fd0 (patch)
tree07e409ed0c3693f4d6a53f8981b6df8e25e55908 /pkgs/servers
parentd5b35332749563abce004457fa19ce0e9ee87f37 (diff)
parent9201d1163ed9e3624fb7bb1860e3838b7b88d78b (diff)
Merge pull request #190548 from pacien/mongodb-6.0
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/nosql/mongodb/6.0.nix12
-rw-r--r--pkgs/servers/nosql/mongodb/mongodb.nix89
2 files changed, 85 insertions, 16 deletions
diff --git a/pkgs/servers/nosql/mongodb/6.0.nix b/pkgs/servers/nosql/mongodb/6.0.nix
new file mode 100644
index 0000000000000..ef3aa77278ca0
--- /dev/null
+++ b/pkgs/servers/nosql/mongodb/6.0.nix
@@ -0,0 +1,12 @@
+{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }:
+
+let
+  buildMongoDB = callPackage ./mongodb.nix {
+    inherit sasl boost Security CoreFoundation cctools;
+  };
+in
+buildMongoDB {
+  version = "6.0.1";
+  sha256 = "sha256-3LdyPHj2t7JskCJh6flCYl6qjfAbRXHsi+19L+0O2Zs=";
+  patches = [ ];
+}
diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix
index 82837e87d1a64..88dcfdcb7080b 100644
--- a/pkgs/servers/nosql/mongodb/mongodb.nix
+++ b/pkgs/servers/nosql/mongodb/mongodb.nix
@@ -1,8 +1,27 @@
-{ lib, stdenv, fetchurl, sconsPackages, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
-, sasl, openssl, libpcap, python3, curl, Security, CoreFoundation, cctools, xz }:
+{ lib
+, stdenv
+, fetchurl
+, sconsPackages
+, boost
+, gperftools
+, pcre-cpp
+, snappy
+, zlib
+, libyamlcpp
+, sasl
+, openssl
+, libpcap
+, python3
+, curl
+, Security
+, CoreFoundation
+, cctools
+, xz
+}:
 
 # Note:
-# The command line tools are written in Go as part of a different package (mongodb-tools)
+#   The command line administrative tools are part of other packages:
+#   see pkgs.mongodb-tools and pkgs.mongosh.
 
 with lib;
 
@@ -11,17 +30,49 @@ with lib;
 }:
 
 let
-  variants = if versionAtLeast version "4.2"
-    then rec { python = scons.python.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]);
-            scons = sconsPackages.scons_3_1_2.override { python = python3; }; # 4.2 < mongodb <= 5.0.x needs scons 3.x built with python3
-            mozjsVersion = "60";
-            mozjsReplace = "defined(HAVE___SINCOS)";
-          }
-    else rec { python = scons.python.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
-            scons = sconsPackages.scons_3_1_2;
-            mozjsVersion = "45";
-            mozjsReplace = "defined(HAVE_SINCOS)";
-          };
+  variants =
+    if versionAtLeast version "6.0" then rec {
+      python = scons.python.withPackages (ps: with ps; [
+        pyyaml
+        cheetah3
+        psutil
+        setuptools
+        packaging
+        pymongo
+      ]);
+
+      # 4.2 < mongodb <= 6.0.x needs scons 3.x built with python3
+      scons = sconsPackages.scons_3_1_2.override { python = python3; };
+
+      mozjsVersion = "60";
+      mozjsReplace = "defined(HAVE___SINCOS)";
+
+    } else if versionAtLeast version "4.2" then rec {
+      python = scons.python.withPackages (ps: with ps; [
+        pyyaml
+        cheetah3
+        psutil
+        setuptools
+      ]);
+
+      # 4.2 < mongodb <= 5.0.x needs scons 3.x built with python3
+      scons = sconsPackages.scons_3_1_2.override { python = python3; };
+
+      mozjsVersion = "60";
+      mozjsReplace = "defined(HAVE___SINCOS)";
+
+    } else rec {
+      python = scons.python.withPackages (ps: with ps; [
+        pyyaml
+        typing
+        cheetah
+      ]);
+
+      scons = sconsPackages.scons_3_1_2;
+      mozjsVersion = "45";
+      mozjsReplace = "defined(HAVE_SINCOS)";
+   };
+
   system-libraries = [
     "boost"
     "pcre"
@@ -129,7 +180,10 @@ in stdenv.mkDerivation rec {
     runHook postInstallCheck
   '';
 
-  installTargets = if (versionAtLeast version "4.4") then "install-core" else "install";
+  installTargets =
+    if (versionAtLeast version "6.0") then "install-devcore"
+    else if (versionAtLeast version "4.4") then "install-core"
+    else "install";
 
   prefixKey = if (versionAtLeast version "4.4") then "DESTDIR=" else "--prefix=";
 
@@ -143,6 +197,9 @@ in stdenv.mkDerivation rec {
     inherit license;
 
     maintainers = with maintainers; [ bluescreen303 offline cstrahan ];
-    platforms = subtractLists systems.doubles.i686 systems.doubles.unix;
+    platforms = subtractLists systems.doubles.i686 (
+      if (versionAtLeast version "6.0") then systems.doubles.linux
+      else systems.doubles.unix
+    );
   };
 }