From 65416849b2a5e4c41c2032d9d5b21e77121ed3f3 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Fri, 9 Jan 2026 15:53:58 -0500 Subject: [PATCH 1/4] ocamlPackages_latest: 5.3 -> 5.4 --- pkgs/top-level/ocaml-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d45ed5935a2d..d253220fe94d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -2321,7 +2321,7 @@ rec { ocamlPackages_5_4 = mkOcamlPackages (callPackage ../development/compilers/ocaml/5.4.nix { }); - ocamlPackages_latest = ocamlPackages_5_3; + ocamlPackages_latest = ocamlPackages_5_4; ocamlPackages = ocamlPackages_5_3; From bcfc4d6991a207c9df3770313ba2b492cbc87ff8 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Fri, 9 Jan 2026 15:54:53 -0500 Subject: [PATCH 2/4] ocamlPackages_latest: recurseIntoAttrs to build in hydra --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 700ae2629131..f7852dcfbe54 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4968,6 +4968,7 @@ with pkgs; ocaml = ocamlPackages.ocaml; ocamlPackages = recurseIntoAttrs ocaml-ng.ocamlPackages; + ocamlPackages_latest = recurseIntoAttrs ocaml-ng.ocamlPackages_latest; ocaml-crunch = ocamlPackages.crunch.bin; From cb589d4c98165f99cbf0d7f2690174f287a58d31 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Fri, 9 Jan 2026 16:02:29 -0500 Subject: [PATCH 3/4] ocamlPackages.camlp4: add 5.4 support --- pkgs/development/tools/ocaml/camlp4/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/ocaml/camlp4/default.nix b/pkgs/development/tools/ocaml/camlp4/default.nix index 1b6674f1c7ce..4f0a11ab5467 100644 --- a/pkgs/development/tools/ocaml/camlp4/default.nix +++ b/pkgs/development/tools/ocaml/camlp4/default.nix @@ -9,7 +9,7 @@ findlib, }: -if lib.versionAtLeast ocaml.version "5.4" then +if lib.versionAtLeast ocaml.version "5.5" then throw "camlp4 is not available for OCaml ${ocaml.version}" else @@ -84,6 +84,10 @@ else version = "5.3"; sha256 = "sha256-V/kKhTP9U4jWDFuQKuB7BS3XICg1lq/2Avj7UJR55+k="; }; + "5.4" = { + version = "5.4"; + sha256 = "sha256-7FsKEr0cRVF4LIOvROWMyXBefRTBaS66ZqwtP2VLefM="; + }; } .${ocaml.meta.branch}; in From 90221290f149cd2ffeb7097c969e2fc10e360cab Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Fri, 9 Jan 2026 16:20:05 -0500 Subject: [PATCH 4/4] ocamlPackages.morbig: use broken instead of throw on incompatible ocaml --- .../ocaml-modules/morbig/default.nix | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/pkgs/development/ocaml-modules/morbig/default.nix b/pkgs/development/ocaml-modules/morbig/default.nix index 9197c9352e1e..163c3322cbf7 100644 --- a/pkgs/development/ocaml-modules/morbig/default.nix +++ b/pkgs/development/ocaml-modules/morbig/default.nix @@ -9,35 +9,32 @@ visitors, }: -lib.throwIf (lib.versionAtLeast ocaml.version "5.4") - "morbig is not available for OCaml ${ocaml.version}" +buildDunePackage rec { + pname = "morbig"; + version = "0.11.0"; - buildDunePackage - rec { - pname = "morbig"; - version = "0.11.0"; + src = fetchFromGitHub { + owner = "colis-anr"; + repo = pname; + rev = "v${version}"; + hash = "sha256-fOBaJHHP/Imi9UDLflI52OdKDcmMxpl+NH3pfofmv/o="; + }; - src = fetchFromGitHub { - owner = "colis-anr"; - repo = pname; - rev = "v${version}"; - hash = "sha256-fOBaJHHP/Imi9UDLflI52OdKDcmMxpl+NH3pfofmv/o="; - }; + nativeBuildInputs = [ + menhir + ]; - nativeBuildInputs = [ - menhir - ]; + propagatedBuildInputs = [ + menhirLib + ppx_deriving_yojson + visitors + ]; - propagatedBuildInputs = [ - menhirLib - ppx_deriving_yojson - visitors - ]; - - meta = { - homepage = "https://github.com/colis-anr/${pname}"; - description = "Static parser for POSIX Shell"; - license = lib.licenses.gpl3Plus; - maintainers = with lib.maintainers; [ niols ]; - }; - } + meta = { + homepage = "https://github.com/colis-anr/${pname}"; + description = "Static parser for POSIX Shell"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ niols ]; + broken = lib.versionAtLeast ocaml.version "5.4"; + }; +}