Merge pull request #249795 from vbgl/ocaml-ppx_inline_test-0.15.1

ocamlPackages.ppx_inline_test: 0.15.0 → 0.15.1
This commit is contained in:
Ulrik Strid
2023-08-18 09:28:31 +02:00
committed by GitHub
3 changed files with 15 additions and 7 deletions
@@ -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 ];
@@ -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 ];
@@ -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 = {