tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mongodb: 2.6.8 -> 3.0.1
William A. Kennington III
11 years ago
1e4e684f
c6531111
+16
-17
1 changed file
expand all
collapse all
unified
split
pkgs
servers
nosql
mongodb
default.nix
+16
-17
pkgs/servers/nosql/mongodb/default.nix
···
1
{ stdenv, fetchurl, scons, boost, gperftools, pcre, snappy
2
-
, libyamlcpp, sasl, openssl, libpcap }:
0
3
4
with stdenv.lib;
5
6
-
let version = "2.6.8";
7
system-libraries = [
8
"pcre"
0
9
"boost"
10
"snappy"
0
0
11
# "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs)
12
"yaml"
13
-
# "v8"
14
-
] ++ optionals (!stdenv.isDarwin) [ "tcmalloc" ];
15
buildInputs = [
16
sasl boost gperftools pcre snappy
17
-
libyamlcpp sasl openssl libpcap
18
];
19
20
other-args = concatStringsSep " " ([
0
21
"--ssl"
0
0
0
22
"--use-sasl-client"
0
23
"--extrapath=${concatStringsSep "," buildInputs}"
24
] ++ map (lib: "--use-system-${lib}") system-libraries);
25
···
28
29
src = fetchurl {
30
url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz";
31
-
sha256 = "01hs65xswggy628hxka2f63qvwz5rfhqlkb05kr20wz1kl6zd5qr";
32
};
33
34
nativeBuildInputs = [ scons ];
35
inherit buildInputs;
36
37
postPatch = ''
38
-
# fix yaml-cpp detection
39
-
sed -i -e "s/\[\"yaml\"\]/\[\"yaml-cpp\"\]/" SConstruct
40
-
41
-
# bug #482576
42
-
sed -i -e "/-Werror/d" src/third_party/v8/SConscript
43
-
44
-
# fix inclusion of std::swap
45
-
sed -i '1i #include <algorithm>' src/mongo/shell/linenoise_utf8.h
46
-
47
# fix environment variable reading
48
substituteInPlace SConstruct \
49
-
--replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR"
50
'';
51
52
buildPhase = ''
53
-
scons all --release ${other-args}
54
'';
55
56
installPhase = ''
···
1
{ stdenv, fetchurl, scons, boost, gperftools, pcre, snappy
2
+
, zlib, libyamlcpp, sasl, openssl, libpcap, wiredtiger
3
+
}:
4
5
with stdenv.lib;
6
7
+
let version = "3.0.1";
8
system-libraries = [
9
"pcre"
10
+
"wiredtiger"
11
"boost"
12
"snappy"
13
+
"zlib"
14
+
# "v8"
15
# "stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs)
16
"yaml"
17
+
] ++ optionals stdenv.isLinux [ "tcmalloc" ];
0
18
buildInputs = [
19
sasl boost gperftools pcre snappy
20
+
zlib libyamlcpp sasl openssl libpcap wiredtiger
21
];
22
23
other-args = concatStringsSep " " ([
24
+
"--c++11=on"
25
"--ssl"
26
+
#"--rocksdb" # Don't have this packaged yet
27
+
"--wiredtiger=on"
28
+
"--js-engine=v8-3.25"
29
"--use-sasl-client"
30
+
"--variant-dir=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld
31
"--extrapath=${concatStringsSep "," buildInputs}"
32
] ++ map (lib: "--use-system-${lib}") system-libraries);
33
···
36
37
src = fetchurl {
38
url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz";
39
+
sha256 = "04qjw7b98h37g8rcih7va3rvg2z95ly38bg181a4nfkak50hd638";
40
};
41
42
nativeBuildInputs = [ scons ];
43
inherit buildInputs;
44
45
postPatch = ''
0
0
0
0
0
0
0
0
0
46
# fix environment variable reading
47
substituteInPlace SConstruct \
48
+
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
49
'';
50
51
buildPhase = ''
52
+
scons core --release ${other-args}
53
'';
54
55
installPhase = ''