about summary refs log tree commit diff
path: root/pkgs/servers/nosql
diff options
context:
space:
mode:
authorIsa <hi@f2k1.de>2024-05-07 19:43:04 +0200
committerIsa <hi@f2k1.de>2024-05-07 19:43:04 +0200
commitfbf40c2ade501265d62f6a0f50942d7235775da6 (patch)
treea404cb38821512ba80f14a5e709f4d09ebf27038 /pkgs/servers/nosql
parentd1c6a5decfd9ad4c84354612d418b2856a57be1d (diff)
mongodb: use github instead of broken mirror
Diffstat (limited to 'pkgs/servers/nosql')
-rw-r--r--pkgs/servers/nosql/mongodb/5.0.nix2
-rw-r--r--pkgs/servers/nosql/mongodb/6.0.nix2
-rw-r--r--pkgs/servers/nosql/mongodb/mongodb.nix9
3 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/servers/nosql/mongodb/5.0.nix b/pkgs/servers/nosql/mongodb/5.0.nix
index 2a26cb94eb168..0dfa701e01a16 100644
--- a/pkgs/servers/nosql/mongodb/5.0.nix
+++ b/pkgs/servers/nosql/mongodb/5.0.nix
@@ -7,7 +7,7 @@ let
   variants = if stdenv.isLinux then
     {
       version = "5.0.24";
-      sha256 = "sha256-6CVQOHN3yFTq6OyVkZMYEjIKfFbQZ6M5KAa3k7qv4Gc=";
+      sha256 = "sha256-SZ62OJD6L3aP6LsTswpuXaayqYbOaSQTgEmV89Si7Xc=";
       patches = [ ./fix-build-with-boost-1.79-5_0-linux.patch ];
     }
   else lib.optionalAttrs stdenv.isDarwin
diff --git a/pkgs/servers/nosql/mongodb/6.0.nix b/pkgs/servers/nosql/mongodb/6.0.nix
index b17c419169280..07f8825d7503b 100644
--- a/pkgs/servers/nosql/mongodb/6.0.nix
+++ b/pkgs/servers/nosql/mongodb/6.0.nix
@@ -7,7 +7,7 @@ let
 in
 buildMongoDB {
   version = "6.0.13";
-  sha256 = "sha256-BD3XrTdv4sCa3h37o1A2s3/R0R8zHiR59a4pY0RxLGU=";
+  sha256 = "sha256-z7gzmWRSc4jA9g+WTkKQkWudh3Ef4xcJVgAQ5HzRe/A=";
   patches = [
     # Patches a bug that it couldn't build MongoDB 6.0 on gcc 13 because a include in ctype.h was missing
     ./fix-gcc-13-ctype-6_0.patch
diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix
index 801ee28303f07..f1cb57b92a6b5 100644
--- a/pkgs/servers/nosql/mongodb/mongodb.nix
+++ b/pkgs/servers/nosql/mongodb/mongodb.nix
@@ -1,6 +1,6 @@
 { lib
 , stdenv
-, fetchurl
+, fetchFromGitHub
 , buildPackages
 , boost
 , gperftools
@@ -63,8 +63,10 @@ in stdenv.mkDerivation rec {
   inherit version;
   pname = "mongodb";
 
-  src = fetchurl {
-    url = "https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz";
+  src = fetchFromGitHub {
+    owner = "mongodb";
+    repo = "mongo";
+    rev = "r${version}";
     inherit sha256;
   };
 
@@ -127,6 +129,7 @@ in stdenv.mkDerivation rec {
     "--disable-warnings-as-errors"
     "VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
     "--link-model=static"
+    "MONGO_VERSION=${version}"
   ]
   ++ map (lib: "--use-system-${lib}") system-libraries;