From 646c7f3be4b945500c20edb77e264c9ba75e073a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 14 May 2024 05:47:19 +0200 Subject: [PATCH 1/2] =?UTF-8?q?ocamlPackges.ppx=5Ftools:=20fix=20evaluatio?= =?UTF-8?q?n=20for=20OCaml=20=E2=89=A5=205.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/ppx_tools/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix index 7a07daf8ddcd..41db9313fe7f 100644 --- a/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -1,5 +1,9 @@ { lib, stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib, cppo }: +if lib.versionAtLeast ocaml.version "5.2" +then throw "ppx_tools is not available for OCaml ${ocaml.version}" +else + let param = let v6_6 = { version = "6.6"; @@ -58,7 +62,6 @@ then buildDunePackage { inherit pname src meta; inherit (param) version buildInputs nativeBuildInputs; - duneVersion = "3"; } else stdenv.mkDerivation { From 2b9f51e102bea483b7fb80cdc07f14729d2bae72 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 14 May 2024 05:47:35 +0200 Subject: [PATCH 2/2] ocamlPackages.alcotest: fix tests with OCaml 5.2 --- pkgs/development/ocaml-modules/alcotest/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/alcotest/default.nix b/pkgs/development/ocaml-modules/alcotest/default.nix index 0e459315fa88..d8310ce23eea 100644 --- a/pkgs/development/ocaml-modules/alcotest/default.nix +++ b/pkgs/development/ocaml-modules/alcotest/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchurl +{ lib, buildDunePackage, fetchurl, fetchpatch , astring, cmdliner, fmt, re, stdlib-shims, uutf, ocaml-syntax-shims }: @@ -6,13 +6,17 @@ buildDunePackage rec { pname = "alcotest"; version = "1.7.0"; - duneVersion = "3"; - src = fetchurl { url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-${version}.tbz"; hash = "sha256-gSus2zS0XoiZXgfXMGvasvckee8ZlmN/HV0fQWZ5At8="; }; + # Fix tests with OCaml 5.2 + patches = fetchpatch { + url = "https://github.com/mirage/alcotest/commit/aa437168b258db97680021116af176c55e1bd53b.patch"; + hash = "sha256-cytuJFg4Mft47LsAEcz2zvzyy1wNzMdeLK+cjaFANpo="; + }; + nativeBuildInputs = [ ocaml-syntax-shims ]; propagatedBuildInputs = [ astring cmdliner fmt re stdlib-shims uutf ];