summary refs log tree commit diff
path: root/pkgs/servers/nosql/mongodb/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-02-03 16:54:03 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-02-03 16:57:19 +0100
commitae74c356d94b795eb07dfe9978788b49b70f5959 (patch)
treec13c6894b75f95d3a4dc4627efef508bb03dfba8 /pkgs/servers/nosql/mongodb/default.nix
parentc9790126312119ce5a2a8ac946d9f086e7ea9f55 (diff)
parent53e0f8b1cdf36574bfede6e62e2ac2739c3ef804 (diff)
downloadnixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.gz
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.bz2
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.lz
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.xz
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.zst
nixpkgs-ae74c356d94b795eb07dfe9978788b49b70f5959.zip
Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
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;
   };
 }