pkgs/servers: stdenv.lib -> lib
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{ stdenv, fetchurl, sconsPackages, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
|
||||
{ lib, stdenv, fetchurl, sconsPackages, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
|
||||
, sasl, openssl, libpcap, python27, python38, curl, Security, CoreFoundation, cctools }:
|
||||
|
||||
# Note:
|
||||
# The command line tools are written in Go as part of a different package (mongodb-tools)
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
{ version, sha256, patches ? []
|
||||
, license ? stdenv.lib.licenses.sspl
|
||||
, license ? lib.licenses.sspl
|
||||
}@args:
|
||||
|
||||
let
|
||||
@@ -34,7 +34,7 @@ let
|
||||
#"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source.
|
||||
#"wiredtiger"
|
||||
] ++ optionals stdenv.isLinux [ "tcmalloc" ];
|
||||
inherit (stdenv.lib) systems subtractLists;
|
||||
inherit (lib) systems subtractLists;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit version;
|
||||
@@ -58,7 +58,7 @@ in stdenv.mkDerivation rec {
|
||||
sasl
|
||||
snappy
|
||||
zlib
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ];
|
||||
] ++ lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ];
|
||||
|
||||
# MongoDB keeps track of its build parameters, which tricks nix into
|
||||
# keeping dependencies to build inputs in the final output.
|
||||
@@ -69,7 +69,7 @@ in stdenv.mkDerivation rec {
|
||||
# fix environment variable reading
|
||||
substituteInPlace SConstruct \
|
||||
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace src/third_party/mozjs-${variants.mozjsVersion}/extract/js/src/jsmath.cpp --replace '${variants.mozjsReplace}' 0
|
||||
|
||||
substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder
|
||||
@@ -77,14 +77,14 @@ in stdenv.mkDerivation rec {
|
||||
substituteInPlace src/third_party/s2/s2cap.cc --replace drem remainder
|
||||
substituteInPlace src/third_party/s2/s2latlng.cc --replace drem remainder
|
||||
substituteInPlace src/third_party/s2/s2latlngrect.cc --replace drem remainder
|
||||
'' + stdenv.lib.optionalString stdenv.isi686 ''
|
||||
'' + lib.optionalString stdenv.isi686 ''
|
||||
|
||||
# don't fail by default on i686
|
||||
substituteInPlace src/mongo/db/storage/storage_options.h \
|
||||
--replace 'engine("wiredTiger")' 'engine("mmapv1")'
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
||||
"-Wno-unused-command-line-argument";
|
||||
|
||||
sconsFlags = [
|
||||
|
||||
@@ -12,5 +12,5 @@ in buildMongoDB {
|
||||
version = "3.4.24";
|
||||
sha256 = "0j6mvgv0jnsnvgkl8505bl88kbxkba66qijlpi1la0dd5pd1imfr";
|
||||
patches = [ ./forget-build-dependencies-3-4.patch ];
|
||||
license = stdenv.lib.licenses.agpl3;
|
||||
license = lib.licenses.agpl3;
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ in buildMongoDB {
|
||||
version = "3.6.13";
|
||||
sha256 = "1mbvk4bmabrswjdm01jssxcygjpq5799zqyx901nsi12vlcymwg4";
|
||||
patches = [ ./forget-build-dependencies.patch ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ];
|
||||
++ lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ];
|
||||
}
|
||||
|
||||
@@ -13,5 +13,5 @@ in buildMongoDB {
|
||||
sha256 = "1j8dqa4jr623y87jrdanyib9r7x18srrvdx952q4azcc8zrdwci1";
|
||||
patches =
|
||||
[ ./forget-build-dependencies.patch ./mozjs-45_fix-3-byte-opcode.patch ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ];
|
||||
++ lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ];
|
||||
}
|
||||
|
||||
@@ -13,5 +13,5 @@ in buildMongoDB {
|
||||
sha256 = "13yvhi1258skdni00bh6ph609whqsmhiimhyqy1gs2liwdvh5278";
|
||||
patches =
|
||||
[ ./forget-build-dependencies-4-2.patch ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view-4-2.patch ];
|
||||
++ lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view-4-2.patch ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user