3
0
Fork 0
forked from mirrors/nixpkgs

mongodb: 3.0.7 -> 3.2.1

Fixes #12639
This commit is contained in:
Charles Strahan 2016-01-26 21:48:57 -05:00
parent 9e743fd151
commit 5583ecf361
2 changed files with 46 additions and 13 deletions

View file

@ -2,17 +2,21 @@
, zlib, libyamlcpp, sasl, openssl, libpcap, wiredtiger
}:
# Note:
# The command line tools are written in Go as part of a different package (mongodb-tools)
with stdenv.lib;
let version = "3.0.7";
let version = "3.2.1";
system-libraries = [
"pcre"
#"asio" -- XXX use package?
#"wiredtiger"
"boost"
"snappy"
"zlib"
# "v8"
# "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs)
#"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source.
#"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs).
"yaml"
] ++ optionals stdenv.isLinux [ "tcmalloc" ];
buildInputs = [
@ -21,19 +25,17 @@ let version = "3.0.7";
]; # ++ optional stdenv.is64bit wiredtiger;
other-args = concatStringsSep " " ([
# these are opt-in, lol
"--cc-use-shell-environment"
"--cxx-use-shell-environment"
"--c++11=on"
"--ssl"
#"--rocksdb" # Don't have this packaged yet
"--wiredtiger=${if stdenv.is64bit then "on" else "off"}"
"--js-engine=v8-3.25"
"--js-engine=mozjs"
"--use-sasl-client"
"--disable-warnings-as-errors"
"--variant-dir=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
"--extrapath=${concatStringsSep "," buildInputs}"
"VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
"CC=$CC"
"CXX=$CXX"
"CCFLAGS=\"${concatStringsSep " " (map (input: "-I${input}/include") buildInputs)}\""
"LINKFLAGS=\"${concatStringsSep " " (map (input: "-L${input}/lib") buildInputs)}\""
] ++ map (lib: "--use-system-${lib}") system-libraries);
in stdenv.mkDerivation rec {
@ -41,12 +43,18 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz";
sha256 = "1rx7faqsq733vdriavdfmvx75nhjq9nm5bgwd3hw1cxzqgkvl99d";
sha256 = "059gskly8maj2c9iy46gccx7a9ya522pl5aaxl5vss5bllxilhsh";
};
nativeBuildInputs = [ scons ];
inherit buildInputs;
# When not building with the system valgrind, the build should use the
# vendored header file - regardless of whether or not we're using the system
# tcmalloc - so we need to lift the include path manipulation out of the
# conditional.
patches = [ ./valgrind-include.patch ];
postPatch = ''
# fix environment variable reading
substituteInPlace SConstruct \
@ -76,7 +84,7 @@ in stdenv.mkDerivation rec {
homepage = http://www.mongodb.org;
license = licenses.agpl3;
maintainers = with maintainers; [ bluescreen303 offline wkennington ];
maintainers = with maintainers; [ bluescreen303 offline wkennington cstrahan ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,25 @@
diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript
index 6add602..6e232d8 100644
--- a/src/mongo/util/SConscript
+++ b/src/mongo/util/SConscript
@@ -241,9 +241,6 @@ if get_option('allocator') == 'tcmalloc':
# Add in the include path for our vendored tcmalloc.
tcmspEnv.InjectThirdPartyIncludePaths('gperftools')
- # Include valgrind since tcmalloc disables itself while running under valgrind
- tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
-
# If our changes to tcmalloc are ever upstreamed, this should become set based on a top
# level configure check, though its effects should still be scoped just to these files.
tcmspEnv.Append(
@@ -252,6 +249,10 @@ if get_option('allocator') == 'tcmalloc':
]
)
+ # Include valgrind since tcmalloc disables itself while running under valgrind
+ if not use_system_version_of_library('valgrind'):
+ tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
+
tcmspEnv.Library(
target='tcmalloc_set_parameter',
source=[