mongodb: use github instead of broken mirror

This commit is contained in:
Isa 2024-05-07 19:43:04 +02:00
parent d1c6a5decf
commit fbf40c2ade
3 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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;