From 428862de06da5bb7a402b945560dd1d021f4291f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 17 Aug 2023 21:06:14 +0200 Subject: [PATCH 1/3] =?UTF-8?q?ocamlPackages.odoc-parser:=20disable=20old?= =?UTF-8?q?=20versions=20for=20OCaml=20=E2=89=A5=205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and clean a bit --- .../development/ocaml-modules/odoc-parser/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/odoc-parser/default.nix b/pkgs/development/ocaml-modules/odoc-parser/default.nix index b653b111698f..1c996973e1c2 100644 --- a/pkgs/development/ocaml-modules/odoc-parser/default.nix +++ b/pkgs/development/ocaml-modules/odoc-parser/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildDunePackage, astring, result, camlp-streams, version ? "2.0.0" }: +{ lib, fetchurl, buildDunePackage, ocaml, astring, result, camlp-streams, version ? "2.0.0" }: let param = { "2.0.0" = { @@ -11,27 +11,30 @@ let param = { }; "1.0.0" = { sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE="; + max_version = "5.0"; extraBuildInputs = []; }; "0.9.0" = { sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk="; + max_version = "5.0"; extraBuildInputs = []; }; }."${version}"; in +lib.throwIf (param ? max_version && lib.versionAtLeast ocaml.version param.max_version) + "odoc-parser ${version} is not available for OCaml ${ocaml.version}" + buildDunePackage rec { pname = "odoc-parser"; inherit version; - minimumOCamlVersion = "4.02"; + minimalOCamlVersion = "4.02"; src = fetchurl { url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz"; inherit (param) sha256; }; - useDune2 = true; - propagatedBuildInputs = [ astring result ] ++ param.extraBuildInputs; meta = { From 778e5e88025101ab1f9835555d927de3960abe44 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 17 Aug 2023 21:06:19 +0200 Subject: [PATCH 2/3] =?UTF-8?q?ocamlPackages.ocamlformat:=20disable=20old?= =?UTF-8?q?=20versions=20for=20OCaml=20=E2=89=A5=205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/ocaml-modules/ocamlformat/ocamlformat.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix index 3ebc179f8601..a2456dbef3b9 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/ocamlformat.nix @@ -1,6 +1,7 @@ { lib , callPackage , buildDunePackage +, ocaml , re , ocamlformat-lib , menhir @@ -8,13 +9,16 @@ }: let inherit (callPackage ./generic.nix { inherit version; }) src library_deps; +in -in buildDunePackage { +lib.throwIf (lib.versionAtLeast ocaml.version "5.0" && !lib.versionAtLeast version "0.23") + "ocamlformat ${version} is not available for OCaml ${ocaml.version}" + +buildDunePackage { pname = "ocamlformat"; inherit src version; minimalOCamlVersion = "4.08"; - duneVersion = "3"; nativeBuildInputs = if lib.versionAtLeast version "0.25.1" then [ ] else [ menhir ]; From 6e81ef545b19868a10bca8a32c98e9728c2e8e2c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 17 Aug 2023 21:06:24 +0200 Subject: [PATCH 3/3] =?UTF-8?q?ocamlPackages.ppx=5Finline=5Ftest:=200.15.0?= =?UTF-8?q?=20=E2=86=92=200.15.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/janestreet/0.15.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/janestreet/0.15.nix b/pkgs/development/ocaml-modules/janestreet/0.15.nix index 969dadb9f55a..846d04315bb4 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.15.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.15.nix @@ -663,7 +663,8 @@ with self; ppx_inline_test = janePackage { pname = "ppx_inline_test"; - hash = "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"; + version = "0.15.1"; + hash = "sha256-9Up4/VK4gayuwbPc3r6gVRj78ILO2G3opL5UDOTKOgk="; minimalOCamlVersion = "4.04.2"; meta.description = "Syntax extension for writing in-line tests in ocaml code"; propagatedBuildInputs = [ ppxlib time_now ];