diff --git a/pkgs/development/ocaml-modules/dolmen/loop.nix b/pkgs/development/ocaml-modules/dolmen/loop.nix index 0b3ca565d81f..8d9b05ca7058 100644 --- a/pkgs/development/ocaml-modules/dolmen/loop.nix +++ b/pkgs/development/ocaml-modules/dolmen/loop.nix @@ -1,4 +1,6 @@ { + lib, + ocaml, buildDunePackage, dolmen, dolmen_type, @@ -11,6 +13,17 @@ buildDunePackage { pname = "dolmen_loop"; inherit (dolmen) src version; + env = + # Fix build with gcc15 + lib.optionalAttrs + ( + lib.versionAtLeast ocaml.version "4.10" && lib.versionOlder ocaml.version "4.14" + || lib.versions.majorMinor ocaml.version == "5.0" + ) + { + NIX_CFLAGS_COMPILE = "-std=gnu11"; + }; + propagatedBuildInputs = [ dolmen dolmen_type