3
0
Fork 0
forked from mirrors/nixpkgs

mongodb-4_4: fic-gcc11-optionnal

gcc 11 doesn't add <optional> by mistake.
This commit is contained in:
Et7f3 2022-07-20 22:59:24 +02:00 committed by Et7f3
parent 6274875188
commit e7d158d4af

View file

@ -70,6 +70,13 @@ in stdenv.mkDerivation rec {
# fix environment variable reading
substituteInPlace SConstruct \
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
'' + lib.optionalString (versionAtLeast version "4.4" && versionOlder version "4.6") ''
# Fix debug gcc 11 and clang 12 builds on Fedora
# https://github.com/mongodb/mongo/commit/e78b2bf6eaa0c43bd76dbb841add167b443d2bb0.patch
substituteInPlace src/mongo/db/query/plan_summary_stats.h --replace '#include <string>' '#include <optional>
#include <string>'
substituteInPlace src/mongo/db/exec/plan_stats.h --replace '#include <string>' '#include <optional>
#include <string>'
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace src/third_party/mozjs-${variants.mozjsVersion}/extract/js/src/jsmath.cpp --replace '${variants.mozjsReplace}' 0
'' + lib.optionalString (stdenv.isDarwin && versionOlder version "3.6") ''