mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
mongodb: Fix build
This commit is contained in:
parent
698dfe11a3
commit
a1d6c60e2d
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user