Merge pull request #231405 from vbgl/ocaml-default-to-dune-version-3

ocamlPackages: default to version 3 of Dune
This commit is contained in:
Ulrik Strid 2023-05-12 12:42:40 +02:00 committed by GitHub
commit f05b051a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 23 additions and 20 deletions

View File

@ -3,7 +3,7 @@
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
let Dune =
let dune-version = args.duneVersion or "2"; in
let dune-version = args.duneVersion or "3"; in
{ "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}"
; in

View File

@ -1,17 +1,15 @@
{ lib, buildDunePackage, dune_2, dune-action-plugin }:
{ lib, buildDunePackage, dune-action-plugin }:
buildDunePackage rec {
pname = "dune-build-info";
inherit (dune_2) src version patches;
useDune2 = true;
inherit (dune-action-plugin) src version preBuild;
dontAddPrefix = true;
buildInputs = [ dune-action-plugin ];
meta = with lib; {
inherit (dune_2.meta) homepage;
inherit (dune-action-plugin.meta) homepage;
description = "Embed build information inside executables";
maintainers = [ maintainers.bcdarwin ];
license = licenses.mit;

View File

@ -1,17 +1,20 @@
{ lib, buildDunePackage, dune_2, csexp, result }:
{ lib, buildDunePackage, dune_3, csexp }:
buildDunePackage rec {
pname = "dune-configurator";
inherit (dune_2) src version patches;
inherit (dune_3) src version patches;
duneVersion = "2";
# This fixes finding csexp
postPatch = ''
rm -rf vendor/pp vendor/csexp
'';
minimalOCamlVersion = "4.03";
minimalOCamlVersion = "4.05";
dontAddPrefix = true;
propagatedBuildInputs = [ csexp result ];
propagatedBuildInputs = [ csexp ];
meta = with lib; {
description = "Helper library for gathering system configuration";

View File

@ -4,7 +4,7 @@ buildDunePackage rec {
pname = "lame";
version = "0.3.6";
minimalOCamlVersion = "4.03";
minimalOCamlVersion = "4.06";
src = fetchFromGitHub {
owner = "savonet";

View File

@ -4,6 +4,8 @@ buildDunePackage rec {
pname = "lo";
version = "0.2.0";
minimalOCamlVersion = "4.06";
src = fetchFromGitHub {
owner = "savonet";
repo = "ocaml-lo";

View File

@ -6,6 +6,8 @@ buildDunePackage rec {
inherit (ocaml_gettext) src version;
minimalOCamlVersion = "4.06";
buildInputs = [ dune-configurator ];
propagatedBuildInputs = [ ocaml_gettext ];

View File

@ -1,13 +1,11 @@
{ lib, ocaml, buildDunePackage, fetchurl, seq, stdlib-shims, ncurses }:
buildDunePackage rec {
buildDunePackage (rec {
minimalOCamlVersion = "4.04";
pname = "ounit2";
version = "2.2.6";
duneVersion = if lib.versionAtLeast ocaml.version "4.08" then "2" else "1";
src = fetchurl {
url = "https://github.com/gildor478/ounit/releases/download/v${version}/ounit-${version}.tbz";
hash = "sha256-BpD7Hg6QoY7tXDVms8wYJdmLDox9UbtrhGyVxFphWRM=";
@ -24,4 +22,6 @@ buildDunePackage rec {
license = licenses.mit;
maintainers = with maintainers; [ sternenseemann ];
};
}
} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") {
duneVersion = "1";
})

View File

@ -10,7 +10,7 @@ buildDunePackage rec {
sha256 = "sha256-9HW3M27BxrEPbF8cMHwzP8FmJduUInpQQAE2672LOuU=";
};
minimalOCamlVersion = "4.05";
minimalOCamlVersion = "4.08";
doCheck = true;

View File

@ -4,8 +4,6 @@ buildDunePackage rec {
pname = "shine";
version = "0.2.3";
duneVersion = "2";
src = fetchFromGitHub {
owner = "savonet";
repo = "ocaml-shine";

View File

@ -6,7 +6,7 @@ buildDunePackage rec {
pname = "js_of_ocaml-ocamlbuild";
version = "5.0";
minimalOCamlVersion = "4.02";
minimalOCamlVersion = "4.03";
src = fetchurl {
url = "https://github.com/ocsigen/js_of_ocaml-ocamlbuild/releases/download/${version}/js_of_ocaml-ocamlbuild-${version}.tbz";