summary refs log tree commit diff
path: root/pkgs/servers/nosql/mongodb/default.nix
diff options
context:
space:
mode:
authorCharles Strahan <charles.c.strahan@gmail.com>2016-01-26 21:48:57 -0500
committerCharles Strahan <charles.c.strahan@gmail.com>2016-01-28 14:15:59 -0500
commit5583ecf361c839bbe2d0bd9e9ad89f796d596cf1 (patch)
tree17ac14c6ff645dd07f7af4279d186aab246c470f /pkgs/servers/nosql/mongodb/default.nix
parent9e743fd1519ceb447baa715edea558db1c4d160c (diff)
downloadnixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.tar
nixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.tar.gz
nixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.tar.bz2
nixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.tar.lz
nixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.tar.xz
nixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.tar.zst
nixpkgs-5583ecf361c839bbe2d0bd9e9ad89f796d596cf1.zip
mongodb: 3.0.7 -> 3.2.1
Fixes #12639
Diffstat (limited to 'pkgs/servers/nosql/mongodb/default.nix')
-rw-r--r--pkgs/servers/nosql/mongodb/default.nix34
1 files changed, 21 insertions, 13 deletions
diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix
index 60a37456b4b..2ea255e4432 100644
--- a/pkgs/servers/nosql/mongodb/default.nix
+++ b/pkgs/servers/nosql/mongodb/default.nix
@@ -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;
   };
 }