ocaml: avoid rebuilding the default version

Defining an env-var as an empty string would cause a rebuild.
This commit is contained in:
Vladimír Čunát
2025-12-29 09:37:13 +01:00
parent 4422c78d20
commit d8a7cfb2de
+3 -1
View File
@@ -118,7 +118,9 @@ stdenv.mkDerivation (
++ optional noNakedPointers (flags "--disable-naked-pointers" "-no-naked-pointers");
dontAddStaticConfigureFlags = lib.versionOlder version "4.08";
env.NIX_CFLAGS_COMPILE = optionalString (lib.versionOlder version "4.14") "-std=gnu11";
env = lib.optionalAttrs (lib.versionOlder version "4.14") {
NIX_CFLAGS_COMPILE = "-std=gnu11";
};
# on aarch64-darwin using --host and --target causes the build to invoke
# `aarch64-apple-darwin-clang` while using assembler. However, such binary