mongodb: 3.0.7 -> 3.2.1

Fixes #12639

+46 -13
+21 -13
pkgs/servers/nosql/mongodb/default.nix
··· 2 2 , zlib, libyamlcpp, sasl, openssl, libpcap, wiredtiger 3 3 }: 4 4 5 + # Note: 6 + # The command line tools are written in Go as part of a different package (mongodb-tools) 7 + 5 8 with stdenv.lib; 6 9 7 - let version = "3.0.7"; 10 + let version = "3.2.1"; 8 11 system-libraries = [ 9 12 "pcre" 13 + #"asio" -- XXX use package? 10 14 #"wiredtiger" 11 15 "boost" 12 16 "snappy" 13 17 "zlib" 14 - # "v8" 15 - # "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs) 18 + #"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source. 19 + #"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs). 16 20 "yaml" 17 21 ] ++ optionals stdenv.isLinux [ "tcmalloc" ]; 18 22 buildInputs = [ ··· 21 25 ]; # ++ optional stdenv.is64bit wiredtiger; 22 26 23 27 other-args = concatStringsSep " " ([ 24 - # these are opt-in, lol 25 - "--cc-use-shell-environment" 26 - "--cxx-use-shell-environment" 27 - 28 - "--c++11=on" 29 28 "--ssl" 30 29 #"--rocksdb" # Don't have this packaged yet 31 30 "--wiredtiger=${if stdenv.is64bit then "on" else "off"}" 32 - "--js-engine=v8-3.25" 31 + "--js-engine=mozjs" 33 32 "--use-sasl-client" 34 33 "--disable-warnings-as-errors" 35 - "--variant-dir=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld 36 - "--extrapath=${concatStringsSep "," buildInputs}" 34 + "VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld 35 + "CC=$CC" 36 + "CXX=$CXX" 37 + "CCFLAGS=\"${concatStringsSep " " (map (input: "-I${input}/include") buildInputs)}\"" 38 + "LINKFLAGS=\"${concatStringsSep " " (map (input: "-L${input}/lib") buildInputs)}\"" 37 39 ] ++ map (lib: "--use-system-${lib}") system-libraries); 38 40 39 41 in stdenv.mkDerivation rec { ··· 41 43 42 44 src = fetchurl { 43 45 url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz"; 44 - sha256 = "1rx7faqsq733vdriavdfmvx75nhjq9nm5bgwd3hw1cxzqgkvl99d"; 46 + sha256 = "059gskly8maj2c9iy46gccx7a9ya522pl5aaxl5vss5bllxilhsh"; 45 47 }; 46 48 47 49 nativeBuildInputs = [ scons ]; 48 50 inherit buildInputs; 51 + 52 + # When not building with the system valgrind, the build should use the 53 + # vendored header file - regardless of whether or not we're using the system 54 + # tcmalloc - so we need to lift the include path manipulation out of the 55 + # conditional. 56 + patches = [ ./valgrind-include.patch ]; 49 57 50 58 postPatch = '' 51 59 # fix environment variable reading ··· 76 84 homepage = http://www.mongodb.org; 77 85 license = licenses.agpl3; 78 86 79 - maintainers = with maintainers; [ bluescreen303 offline wkennington ]; 87 + maintainers = with maintainers; [ bluescreen303 offline wkennington cstrahan ]; 80 88 platforms = platforms.unix; 81 89 }; 82 90 }
+25
pkgs/servers/nosql/mongodb/valgrind-include.patch
··· 1 + diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript 2 + index 6add602..6e232d8 100644 3 + --- a/src/mongo/util/SConscript 4 + +++ b/src/mongo/util/SConscript 5 + @@ -241,9 +241,6 @@ if get_option('allocator') == 'tcmalloc': 6 + # Add in the include path for our vendored tcmalloc. 7 + tcmspEnv.InjectThirdPartyIncludePaths('gperftools') 8 + 9 + - # Include valgrind since tcmalloc disables itself while running under valgrind 10 + - tcmspEnv.InjectThirdPartyIncludePaths('valgrind') 11 + - 12 + # If our changes to tcmalloc are ever upstreamed, this should become set based on a top 13 + # level configure check, though its effects should still be scoped just to these files. 14 + tcmspEnv.Append( 15 + @@ -252,6 +249,10 @@ if get_option('allocator') == 'tcmalloc': 16 + ] 17 + ) 18 + 19 + + # Include valgrind since tcmalloc disables itself while running under valgrind 20 + + if not use_system_version_of_library('valgrind'): 21 + + tcmspEnv.InjectThirdPartyIncludePaths('valgrind') 22 + + 23 + tcmspEnv.Library( 24 + target='tcmalloc_set_parameter', 25 + source=[