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 /pkgs/servers/nosql/mongodb/default.nix | |
parent | 698dfe11a3710ae9dc98ad983309771b9aa4eeb5 (diff) | |
download | nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.tar nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.tar.gz nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.tar.bz2 nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.tar.lz nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.tar.xz nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.tar.zst nixpkgs-a1d6c60e2d06045cf0ee706f5357f7fbb00f94f7.zip |
mongodb: Fix build
Diffstat (limited to 'pkgs/servers/nosql/mongodb/default.nix')
-rw-r--r-- | pkgs/servers/nosql/mongodb/default.nix | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix index 40c255d5921..651b84b7afe 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; }; } |