mbedtls: make -Wno-error conditional on gcc version

https://hydra.nixos.org/build/273869701/nixlog/2
This commit is contained in:
Fabián Heredia Montiel 2024-09-26 16:52:35 -06:00
parent e5a08c8859
commit 045a98f88c

View File

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
"-DGEN_FILES=off"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
env = lib.optionalAttrs (stdenv.cc.isGNU && (lib.versionAtLeast (lib.getVersion stdenv.cc.cc) "14")) {
NIX_CFLAGS_COMPILE = "-Wno-error=calloc-transposed-args";
};