diff options
author | Nathan Smyth <nathan.smyth@mongodb.com> | 2019-08-04 16:25:56 +1000 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2020-03-26 14:02:49 +0100 |
commit | 44641ed00bf3b1d5914a685137f16910f6454951 (patch) | |
tree | 947500bd346d326c3021e85c9f44fd5ba498a147 /pkgs/servers/nosql | |
parent | 165d8bda8265ca9c247d1ab5e1137117c3236e25 (diff) | |
download | nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.tar nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.tar.gz nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.tar.bz2 nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.tar.lz nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.tar.xz nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.tar.zst nixpkgs-44641ed00bf3b1d5914a685137f16910f6454951.zip |
nixos/tests/mongodb: test against mongodb versions 3.4, 3.6, 4.0
Now has tests for 3.4, 3.6, 4.0. Has some duplication, but it appears to work on my machine.
Diffstat (limited to 'pkgs/servers/nosql')
-rw-r--r-- | pkgs/servers/nosql/mongodb/mongodb.nix | 35 | ||||
-rw-r--r-- | pkgs/servers/nosql/mongodb/v3_4.nix | 21 | ||||
-rw-r--r-- | pkgs/servers/nosql/mongodb/v3_6.nix | 21 | ||||
-rw-r--r-- | pkgs/servers/nosql/mongodb/v4_0.nix | 23 |
4 files changed, 57 insertions, 43 deletions
diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index 3824fc6d1a7..da4b46a69da 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -1,26 +1,25 @@ -{ stdenv, fetchurl, fetchpatch, scons, boost, gperftools, pcre-cpp, snappy, zlib, - libyamlcpp, sasl, openssl, libpcap, wiredtiger, Security, python27, curl, CoreFoundation, cctools -}: +{ stdenv, fetchurl, scons, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp +, sasl, openssl, libpcap, python27, curl, Security, CoreFoundation, cctools }: # Note: # The command line tools are written in Go as part of a different package (mongodb-tools) with stdenv.lib; -{ version, sha256, patches ? [ ] }@args: +{ version, sha256, patches ? [] }@args: let python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]); system-libraries = [ - "pcre" - #"asio" -- XXX use package? - #"wiredtiger" "boost" + "pcre" "snappy" + "yaml" "zlib" - #"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source. + #"asio" -- XXX use package? #"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs). - "yaml" + #"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source. + #"wiredtiger" ] ++ optionals stdenv.isLinux [ "tcmalloc" ]; inherit (stdenv.lib) systems subtractLists; @@ -35,8 +34,18 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ scons ]; buildInputs = [ - sasl boost gperftools pcre-cpp snappy - zlib libyamlcpp sasl openssl.dev openssl.out libpcap python curl + boost + curl + gperftools + libpcap + libyamlcpp + openssl.dev + openssl.out + pcre-cpp + python + sasl + snappy + zlib ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ]; # MongoDB keeps track of its build parameters, which tricks nix into @@ -84,10 +93,6 @@ in stdenv.mkDerivation rec { sconsFlags+=" CXX=$CXX" '' + optionalString stdenv.isAarch64 '' sconsFlags+=" CCFLAGS='-march=armv8-a+crc'" - '' + optionalString stdenv.isDarwin '' - sconsFlags+=" CPPPATH=${openssl.dev}/include" - '' + optionalString stdenv.isDarwin '' - sconsFlags+=" LIBPATH=${openssl.out}/lib" ''; preInstall = '' diff --git a/pkgs/servers/nosql/mongodb/v3_4.nix b/pkgs/servers/nosql/mongodb/v3_4.nix index fb124a6b2e5..113fa0680c3 100644 --- a/pkgs/servers/nosql/mongodb/v3_4.nix +++ b/pkgs/servers/nosql/mongodb/v3_4.nix @@ -1,12 +1,15 @@ { stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: let - buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; inherit CoreFoundation; inherit cctools; }; -in - buildMongoDB { - version = "3.4.22"; - sha256 = "1rizrr69b26y7fb973n52hk387sf3mxzqg8wka4f3zdjdidfyiny"; - patches = [ - ./forget-build-dependencies-3-4.patch - ]; - } + buildMongoDB = callPackage ./mongodb.nix { + inherit sasl; + inherit boost; + inherit Security; + inherit CoreFoundation; + inherit cctools; + }; +in buildMongoDB { + version = "3.4.22"; + sha256 = "1rizrr69b26y7fb973n52hk387sf3mxzqg8wka4f3zdjdidfyiny"; + patches = [ ./forget-build-dependencies-3-4.patch ]; +} diff --git a/pkgs/servers/nosql/mongodb/v3_6.nix b/pkgs/servers/nosql/mongodb/v3_6.nix index 412d72b4e66..8da901c00c5 100644 --- a/pkgs/servers/nosql/mongodb/v3_6.nix +++ b/pkgs/servers/nosql/mongodb/v3_6.nix @@ -1,12 +1,15 @@ { stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: let - buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; inherit CoreFoundation; inherit cctools; }; -in - buildMongoDB { - version = "3.6.13"; - sha256 = "1mbvk4bmabrswjdm01jssxcygjpq5799zqyx901nsi12vlcymwg4"; - patches = [ - ./forget-build-dependencies.patch - ]; - } + buildMongoDB = callPackage ./mongodb.nix { + inherit sasl; + inherit boost; + inherit Security; + inherit CoreFoundation; + inherit cctools; + }; +in buildMongoDB { + version = "3.6.13"; + sha256 = "1mbvk4bmabrswjdm01jssxcygjpq5799zqyx901nsi12vlcymwg4"; + patches = [ ./forget-build-dependencies.patch ]; +} diff --git a/pkgs/servers/nosql/mongodb/v4_0.nix b/pkgs/servers/nosql/mongodb/v4_0.nix index 819d41cd17e..95606317f31 100644 --- a/pkgs/servers/nosql/mongodb/v4_0.nix +++ b/pkgs/servers/nosql/mongodb/v4_0.nix @@ -1,13 +1,16 @@ { stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: let - buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; inherit CoreFoundation; inherit cctools; }; -in - buildMongoDB { - version = "4.0.11"; - sha256 = "0kry8kzzpah0l7j8xa333y1ixwvarc28ip3f6lx5590yy11j8ry2"; - patches = [ - ./forget-build-dependencies.patch - ./mozjs-45_fix-3-byte-opcode.patch - ]; - } + buildMongoDB = callPackage ./mongodb.nix { + inherit sasl; + inherit boost; + inherit Security; + inherit CoreFoundation; + inherit cctools; + }; +in buildMongoDB { + version = "4.0.11"; + sha256 = "0kry8kzzpah0l7j8xa333y1ixwvarc28ip3f6lx5590yy11j8ry2"; + patches = + [ ./forget-build-dependencies.patch ./mozjs-45_fix-3-byte-opcode.patch ]; +} |