Merge pull request #299603 from qubitnano/origin-mongo-avx

mongodb: add avxSupport override

authored by

Weijia Wang and committed by
GitHub
b930cdc5 abd81f38

+14 -2
+5 -1
pkgs/servers/nosql/mongodb/5.0.nix
··· 1 - { stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: 1 + { stdenv, callPackage, lib, sasl, boost 2 + , Security, CoreFoundation, cctools 3 + , avxSupport ? stdenv.hostPlatform.avxSupport 4 + }: 2 5 3 6 let 4 7 buildMongoDB = callPackage ./mongodb.nix { ··· 18 21 }; 19 22 in 20 23 buildMongoDB { 24 + inherit avxSupport; 21 25 version = variants.version; 22 26 sha256 = variants.sha256; 23 27 patches = [
+5 -1
pkgs/servers/nosql/mongodb/6.0.nix
··· 1 - { stdenv, callPackage, lib, fetchpatch, sasl, boost, Security, CoreFoundation, cctools }: 1 + { stdenv, callPackage, lib, fetchpatch 2 + , sasl, boost, Security, CoreFoundation, cctools 3 + , avxSupport ? stdenv.hostPlatform.avxSupport 4 + }: 2 5 3 6 let 4 7 buildMongoDB = callPackage ./mongodb.nix { ··· 6 9 }; 7 10 in 8 11 buildMongoDB { 12 + inherit avxSupport; 9 13 version = "6.0.15"; 10 14 sha256 = "sha256-DX1wbrDx1/JrEHbzNaXC4Hqq7MrLqz+JZgG98beyVds="; 11 15 patches = [
+4
pkgs/servers/nosql/mongodb/mongodb.nix
··· 29 29 30 30 { version, sha256, patches ? [] 31 31 , license ? lib.licenses.sspl 32 + , avxSupport ? stdenv.hostPlatform.avxSupport 32 33 }: 33 34 34 35 let ··· 114 115 # don't fail by default on i686 115 116 substituteInPlace src/mongo/db/storage/storage_options.h \ 116 117 --replace 'engine("wiredTiger")' 'engine("mmapv1")' 118 + '' + lib.optionalString (!avxSupport) '' 119 + substituteInPlace SConstruct \ 120 + --replace-fail "default=['+sandybridge']," 'default=[],' 117 121 ''; 118 122 119 123 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang