Merge pull request #309900 from f2k1de/fixmongolink

mongodb: use github instead of broken mirror
This commit is contained in:
Leona Maroni 2024-05-07 22:40:30 +02:00 committed by GitHub
commit 57aff7a7b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View File

@ -7,7 +7,7 @@ let
variants = if stdenv.isLinux then variants = if stdenv.isLinux then
{ {
version = "5.0.24"; version = "5.0.24";
sha256 = "sha256-6CVQOHN3yFTq6OyVkZMYEjIKfFbQZ6M5KAa3k7qv4Gc="; sha256 = "sha256-SZ62OJD6L3aP6LsTswpuXaayqYbOaSQTgEmV89Si7Xc=";
patches = [ ./fix-build-with-boost-1.79-5_0-linux.patch ]; patches = [ ./fix-build-with-boost-1.79-5_0-linux.patch ];
} }
else lib.optionalAttrs stdenv.isDarwin else lib.optionalAttrs stdenv.isDarwin

View File

@ -7,7 +7,7 @@ let
in in
buildMongoDB { buildMongoDB {
version = "6.0.13"; version = "6.0.13";
sha256 = "sha256-BD3XrTdv4sCa3h37o1A2s3/R0R8zHiR59a4pY0RxLGU="; sha256 = "sha256-z7gzmWRSc4jA9g+WTkKQkWudh3Ef4xcJVgAQ5HzRe/A=";
patches = [ patches = [
# Patches a bug that it couldn't build MongoDB 6.0 on gcc 13 because a include in ctype.h was missing # 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 ./fix-gcc-13-ctype-6_0.patch

View File

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, fetchurl , fetchFromGitHub
, buildPackages , buildPackages
, boost , boost
, gperftools , gperftools
@ -63,8 +63,10 @@ in stdenv.mkDerivation rec {
inherit version; inherit version;
pname = "mongodb"; pname = "mongodb";
src = fetchurl { src = fetchFromGitHub {
url = "https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz"; owner = "mongodb";
repo = "mongo";
rev = "r${version}";
inherit sha256; inherit sha256;
}; };
@ -127,6 +129,7 @@ in stdenv.mkDerivation rec {
"--disable-warnings-as-errors" "--disable-warnings-as-errors"
"VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld "VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
"--link-model=static" "--link-model=static"
"MONGO_VERSION=${version}"
] ]
++ map (lib: "--use-system-${lib}") system-libraries; ++ map (lib: "--use-system-${lib}") system-libraries;