ocamlPackages.dune_3: enable for OCaml < 4.08

This commit is contained in:
Vincent Laporte 2023-02-01 09:20:48 +01:00
parent 6094e4cfb2
commit 98f36b2d74
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
5 changed files with 10 additions and 1 deletions

View File

@ -4,6 +4,7 @@ buildDunePackage rec {
pname = "chrome-trace";
inherit (dune_3) src version;
minimalOCamlVersion = "4.08";
duneVersion = "3";
dontAddPrefix = true;

View File

@ -4,6 +4,7 @@ buildDunePackage {
pname = "ordering";
inherit (dune_3) version src;
duneVersion = "3";
minimalOCamlVersion = "4.08";
dontAddPrefix = true;

View File

@ -5,6 +5,7 @@ buildDunePackage rec {
inherit (dune_3) src version;
duneVersion = "3";
minimalOCamlVersion = "4.08";
dontAddPrefix = true;

View File

@ -7,6 +7,7 @@ buildDunePackage rec {
pname = "js_of_ocaml-compiler";
version = "4.1.0";
duneVersion = "3";
minimalOCamlVersion = "4.08";
src = fetchurl {
url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz";

View File

@ -357,7 +357,12 @@ let
then pkgs.dune_2
else throw "dune_2 is not available for OCaml ${ocaml.version}";
dune_3 = callPackage ../development/tools/ocaml/dune/3.nix { };
dune_3 =
if lib.versionAtLeast ocaml.version "4.08"
then callPackage ../development/tools/ocaml/dune/3.nix { }
else if lib.versionAtLeast ocaml.version "4.02"
then pkgs.dune_3
else throw "dune_3 is not available for OCaml ${ocaml.version}";
dune-action-plugin = callPackage ../development/ocaml-modules/dune-action-plugin { };