From 4becb3821e08d02388045f40044c0fefa36cdec5 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Mon, 4 Nov 2024 19:41:40 -0800 Subject: [PATCH] ocaml: build defaultentry not bootstrap on 5.2+ Building ocaml fails occasionally on aarch64-darwin. Using the defaultentry target to build on ocaml 5.2 and greater may rectify this. --- pkgs/development/compilers/ocaml/generic.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index b40efbd32741..38795426bea2 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -105,7 +105,9 @@ stdenv.mkDerivation (args // { # sequential order among them as a single rule. makefile = ./Makefile.nixpkgs; buildFlags = if useNativeCompilers - then ["nixpkgs_world_bootstrap_world_opt"] + then [(if lib.versionOlder version "5.2" + then "nixpkgs_world_bootstrap_world_opt" + else "defaultentry")] else ["nixpkgs_world"]; buildInputs = optional (lib.versionOlder version "4.07") ncurses ++ optionals useX11 [ libX11 xorgproto ];