diff options
author | William A. Kennington III <william@wkennington.com> | 2014-09-14 11:20:10 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2014-09-21 15:18:16 -0700 |
commit | a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7 (patch) | |
tree | 627fab587a7ed9ab7f0473db2f70c615732c5362 | |
parent | 698dfe11a3710ae9dc98ad983309771b9aa4eeb5 (diff) |
mongodb: Fix build
-rw-r--r-- | pkgs/servers/nosql/mongodb/default.nix | 35 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 29 insertions, 10 deletions
diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix index 40c255d592147..651b84b7afea6 100644 --- a/pkgs/servers/nosql/mongodb/default.nix +++ b/pkgs/servers/nosql/mongodb/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, scons, boost, gperftools, pcre, snappy }: +{ stdenv, fetchurl, scons, boost, gperftools, pcre, snappy +, libyamlcpp, sasl, openssl, libpcap }: with stdenv.lib; @@ -7,12 +8,20 @@ let version = "2.6.4"; "pcre" "boost" "snappy" - # "v8" -- mongo still bundles 3.12 and does not work with 3.15+ # "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs) - # "yaml" -- it seems nixpkgs' yamlcpp (0.5.1) is problematic for mongo + "yaml" + # "v8" ] ++ optionals (!stdenv.isDarwin) [ "tcmalloc" ]; - system-lib-args = concatStringsSep " " - (map (lib: "--use-system-${lib}") system-libraries); + buildInputs = [ + sasl boost boost.lib gperftools pcre snappy + libyamlcpp sasl openssl libpcap + ]; + + other-args = concatStringsSep " " ([ + "--ssl" + "--use-sasl-client" + "--extrapath=${concatStringsSep "," buildInputs}" + ] ++ map (lib: "--use-system-${lib}") system-libraries); in stdenv.mkDerivation rec { name = "mongodb-${version}"; @@ -22,20 +31,28 @@ in stdenv.mkDerivation rec { sha256 = "1h4rrgcb95234ryjma3fjg50qsm1bnxjx5ib0c3p9nzmc2ji2m07"; }; - nativeBuildInputs = [ scons boost gperftools pcre snappy ]; + nativeBuildInputs = [ scons ]; + inherit buildInputs; postPatch = '' + # fix yaml-cpp detection + sed -i -e "s/\[\"yaml\"\]/\[\"yaml-cpp\"\]/" SConstruct + + # bug #482576 + sed -i -e "/-Werror/d" src/third_party/v8/SConscript + + # fix environment variable reading substituteInPlace SConstruct \ --replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR" ''; buildPhase = '' - scons all --release ${system-lib-args} + scons all --release ${other-args} ''; installPhase = '' mkdir -p $out/lib - scons install --release --prefix=$out ${system-lib-args} + scons install --release --prefix=$out ${other-args} ''; meta = { @@ -43,7 +60,7 @@ in stdenv.mkDerivation rec { homepage = http://www.mongodb.org; license = licenses.agpl3; - maintainers = with maintainers; [ bluescreen303 offline ]; + maintainers = with maintainers; [ bluescreen303 offline wkennington ]; platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f3882c45f9911..03115b13b31ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7191,7 +7191,9 @@ let mariadb = callPackage ../servers/sql/mariadb {}; - mongodb = callPackage ../servers/nosql/mongodb { }; + mongodb = callPackage ../servers/nosql/mongodb { + sasl = cyrus_sasl; + }; riak = callPackage ../servers/nosql/riak/1.3.1.nix { }; |