Merge pull request #299603 from qubitnano/origin-mongo-avx
mongodb: add avxSupport override
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }:
|
||||
{ stdenv, callPackage, lib, sasl, boost
|
||||
, Security, CoreFoundation, cctools
|
||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||
}:
|
||||
|
||||
let
|
||||
buildMongoDB = callPackage ./mongodb.nix {
|
||||
@@ -18,6 +21,7 @@ let
|
||||
};
|
||||
in
|
||||
buildMongoDB {
|
||||
inherit avxSupport;
|
||||
version = variants.version;
|
||||
sha256 = variants.sha256;
|
||||
patches = [
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{ stdenv, callPackage, lib, fetchpatch, sasl, boost, Security, CoreFoundation, cctools }:
|
||||
{ stdenv, callPackage, lib, fetchpatch
|
||||
, sasl, boost, Security, CoreFoundation, cctools
|
||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||
}:
|
||||
|
||||
let
|
||||
buildMongoDB = callPackage ./mongodb.nix {
|
||||
@@ -6,6 +9,7 @@ let
|
||||
};
|
||||
in
|
||||
buildMongoDB {
|
||||
inherit avxSupport;
|
||||
version = "6.0.15";
|
||||
sha256 = "sha256-DX1wbrDx1/JrEHbzNaXC4Hqq7MrLqz+JZgG98beyVds=";
|
||||
patches = [
|
||||
|
||||
@@ -29,6 +29,7 @@ with lib;
|
||||
|
||||
{ version, sha256, patches ? []
|
||||
, license ? lib.licenses.sspl
|
||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -114,6 +115,9 @@ in stdenv.mkDerivation rec {
|
||||
# don't fail by default on i686
|
||||
substituteInPlace src/mongo/db/storage/storage_options.h \
|
||||
--replace 'engine("wiredTiger")' 'engine("mmapv1")'
|
||||
'' + lib.optionalString (!avxSupport) ''
|
||||
substituteInPlace SConstruct \
|
||||
--replace-fail "default=['+sandybridge']," 'default=[],'
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
||||
|
||||
Reference in New Issue
Block a user