mongodb: 3.4.10 -> 4.0.4

fix: Adding libtool to allow darwin compiles

Libtool seems to be required for mongodb to compile on darwin.

fix: Marking MongoDB as broken on aarch64

fix: Adding libtools to the pkg imports

Update mongodb to 4.0.4

(cherry picked from commit e9bec1adf6)
This commit is contained in:
Nathan Smyth 2018-05-03 17:42:24 +10:00 committed by Maximilian Bosch
parent 7a7952bce6
commit ac23e5039c
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
3 changed files with 26 additions and 20 deletions

View file

@ -649,6 +649,13 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
url = http://metadata.ftp-master.debian.org/changelogs/main/d/debianutils/debianutils_4.8.1_copyright; url = http://metadata.ftp-master.debian.org/changelogs/main/d/debianutils/debianutils_4.8.1_copyright;
}; };
sspl = {
shortName = "SSPL";
fullName = "Server Side Public License";
url = https://www.mongodb.com/licensing/server-side-public-license;
free = false;
};
tcltk = spdx { tcltk = spdx {
spdxId = "TCL"; spdxId = "TCL";
fullName = "TCL/TK License"; fullName = "TCL/TK License";

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, fetchpatch, scons, boost, gperftools, pcre-cpp, snappy { stdenv, fetchurl, fetchpatch, scons, boost, gperftools, pcre-cpp, snappy, zlib,
, zlib, libyamlcpp, sasl, openssl, libpcap, Security libyamlcpp, sasl, openssl, libpcap, wiredtiger, Security, python27, libtool, curl
}: }:
# Note: # Note:
@ -7,7 +7,8 @@
with stdenv.lib; with stdenv.lib;
let version = "3.4.10"; let version = "4.0.4";
python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
system-libraries = [ system-libraries = [
"pcre" "pcre"
#"asio" -- XXX use package? #"asio" -- XXX use package?
@ -19,6 +20,7 @@ let version = "3.4.10";
#"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs). #"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs).
"yaml" "yaml"
] ++ optionals stdenv.isLinux [ "tcmalloc" ]; ] ++ optionals stdenv.isLinux [ "tcmalloc" ];
inherit (stdenv.lib) systems subtractLists;
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "mongodb"; pname = "mongodb";
@ -26,14 +28,14 @@ in stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
url = "https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz"; url = "https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz";
sha256 = "1wz2mhl9z0b1bdkg6m8v8mvw9k60mdv5ybq554xn3yjj9z500f24"; sha256 = "1qycwr9f99b5cy4nf54yv2y724xis3lwd2h6iv2pfp36qnhsvfh2";
}; };
nativeBuildInputs = [ scons ]; nativeBuildInputs = [ scons ];
buildInputs = [ buildInputs = [
sasl boost gperftools pcre-cpp snappy sasl boost gperftools pcre-cpp snappy
zlib libyamlcpp sasl openssl.dev openssl.out libpcap zlib libyamlcpp sasl openssl.dev openssl.out libpcap python curl
] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security libtool ];
patches = patches =
[ [
@ -41,11 +43,6 @@ in stdenv.mkDerivation {
# keeping dependencies to build inputs in the final output. # keeping dependencies to build inputs in the final output.
# We remove the build flags from buildInfo data. # We remove the build flags from buildInfo data.
./forget-build-dependencies.patch ./forget-build-dependencies.patch
(fetchpatch {
url = https://projects.archlinux.org/svntogit/community.git/plain/trunk/boost160.patch?h=packages/mongodb;
name = "boost160.patch";
sha256 = "0bvsf3499zj55pzamwjmsssr6x63w434944w76273fr5rxwzcmh8";
})
]; ];
postPatch = '' postPatch = ''
@ -89,6 +86,11 @@ in stdenv.mkDerivation {
preInstall = '' preInstall = ''
mkdir -p $out/lib mkdir -p $out/lib
''; '';
postInstall = ''
rm $out/bin/install_compass
'';
prefixKey = "--prefix="; prefixKey = "--prefix=";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -98,9 +100,10 @@ in stdenv.mkDerivation {
meta = { meta = {
description = "A scalable, high-performance, open source NoSQL database"; description = "A scalable, high-performance, open source NoSQL database";
homepage = http://www.mongodb.org; homepage = http://www.mongodb.org;
license = licenses.agpl3; license = licenses.sspl;
broken = stdenv.hostPlatform.isAarch64; #g++ has internal compiler errors
maintainers = with maintainers; [ bluescreen303 offline cstrahan ]; maintainers = with maintainers; [ bluescreen303 offline cstrahan ];
platforms = platforms.unix; platforms = subtractLists systems.doubles.i686 systems.doubles.unix;
}; };
} }

View file

@ -1,8 +1,6 @@
--- a/site_scons/mongo_scons_utils.py --- a/site_scons/mongo/generators.py
+++ b/site_scons/mongo_scons_utils.py +++ b/site_scons/mongo/generators.py
@@ -84,14 +84,11 @@ @@ -18,10 +18,7 @@ def default_buildinfo_environment_data():
def default_buildinfo_environment_data():
return (
('distmod', '$MONGO_DISTMOD', True, True,), ('distmod', '$MONGO_DISTMOD', True, True,),
('distarch', '$MONGO_DISTARCH', True, True,), ('distarch', '$MONGO_DISTARCH', True, True,),
('cc', '$CC_VERSION', True, False,), ('cc', '$CC_VERSION', True, False,),
@ -13,5 +11,3 @@
('target_arch', '$TARGET_ARCH', True, True,), ('target_arch', '$TARGET_ARCH', True, True,),
('target_os', '$TARGET_OS', True, False,), ('target_os', '$TARGET_OS', True, False,),
) )
# If you want buildInfo and --version to be relatively empty, set