diff --git a/pkgs/development/ocaml-modules/ocaml-result/default.nix b/pkgs/development/ocaml-modules/ocaml-result/default.nix index 2fda6f1440be..15e8f96a4846 100644 --- a/pkgs/development/ocaml-modules/ocaml-result/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-result/default.nix @@ -1,11 +1,9 @@ { lib, buildDunePackage, fetchurl, ocaml }: -buildDunePackage rec { +buildDunePackage (rec { pname = "result"; version = "1.5"; - useDune2 = lib.versionAtLeast ocaml.version "4.08"; - src = fetchurl { url = "https://github.com/janestreet/result/releases/download/${version}/result-${version}.tbz"; sha256 = "0cpfp35fdwnv3p30a06wd0py3805qxmq3jmcynjc3x2qhlimwfkw"; @@ -21,4 +19,6 @@ buildDunePackage rec { ''; license = lib.licenses.bsd3; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +}) diff --git a/pkgs/development/ocaml-modules/octavius/default.nix b/pkgs/development/ocaml-modules/octavius/default.nix index a4124df66640..5c108ac6b80e 100644 --- a/pkgs/development/ocaml-modules/octavius/default.nix +++ b/pkgs/development/ocaml-modules/octavius/default.nix @@ -1,6 +1,6 @@ { lib, fetchFromGitHub, buildDunePackage, ocaml }: -buildDunePackage rec { +buildDunePackage (rec { pname = "octavius"; version = "1.2.2"; @@ -11,8 +11,7 @@ buildDunePackage rec { sha256 = "sha256-/S6WpIo1c5J9uM3xgtAM/elhnsl0XimnIFsKy3ootbA="; }; - minimumOCamlVersion = "4.03"; - useDune2 = lib.versionAtLeast ocaml.version "4.08"; + minimalOCamlVersion = "4.03"; doCheck = true; @@ -22,4 +21,6 @@ buildDunePackage rec { license = licenses.isc; maintainers = with maintainers; [ vbgl ]; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +}) diff --git a/pkgs/development/ocaml-modules/ppx_derivers/default.nix b/pkgs/development/ocaml-modules/ppx_derivers/default.nix index 84dda38846fe..49217781b8ac 100644 --- a/pkgs/development/ocaml-modules/ppx_derivers/default.nix +++ b/pkgs/development/ocaml-modules/ppx_derivers/default.nix @@ -1,12 +1,10 @@ { lib, fetchFromGitHub, buildDunePackage, ocaml }: -buildDunePackage rec { +buildDunePackage (rec { pname = "ppx_derivers"; version = "1.2.1"; - useDune2 = lib.versionAtLeast ocaml.version "4.08"; - - minimumOCamlVersion = "4.02"; + minimalOCamlVersion = "4.02"; src = fetchFromGitHub { owner = "diml"; @@ -21,4 +19,6 @@ buildDunePackage rec { maintainers = [ lib.maintainers.vbgl ]; inherit (src.meta) homepage; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +}) diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index 174324d49cfd..bbddba331ee3 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -13,14 +13,12 @@ let version_sha = if lib.versionAtLeast ocaml.version "4.08" }; in -buildDunePackage rec { +buildDunePackage (rec { pname = "re"; version = version_sha.version; minimalOCamlVersion = "4.02"; - useDune2 = lib.versionAtLeast ocaml.version "4.08"; - src = fetchurl { url = "https://github.com/ocaml/ocaml-re/releases/download/${version}/re-${version}.tbz"; sha256 = version_sha.sha256; @@ -36,4 +34,6 @@ buildDunePackage rec { license = lib.licenses.lgpl2; maintainers = with lib.maintainers; [ vbgl ]; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +}) diff --git a/pkgs/development/ocaml-modules/stdlib-shims/default.nix b/pkgs/development/ocaml-modules/stdlib-shims/default.nix index 470a2a5bd030..54b97abfb86a 100644 --- a/pkgs/development/ocaml-modules/stdlib-shims/default.nix +++ b/pkgs/development/ocaml-modules/stdlib-shims/default.nix @@ -1,14 +1,13 @@ { buildDunePackage, lib, fetchurl, ocaml }: -buildDunePackage rec { +buildDunePackage (rec { pname = "stdlib-shims"; version = "0.3.0"; src = fetchurl { url = "https://github.com/ocaml/${pname}/releases/download/${version}/${pname}-${version}.tbz"; sha256 = "0jnqsv6pqp5b5g7lcjwgd75zqqvcwcl5a32zi03zg1kvj79p5gxs"; }; - useDune2 = lib.versionAtLeast ocaml.version "4.08"; - minimumOCamlVersion = "4.02"; + minimalOCamlVersion = "4.02"; doCheck = true; meta = { description = "Shims for forward-compatibility between versions of the OCaml standard library"; @@ -16,4 +15,6 @@ buildDunePackage rec { inherit (ocaml.meta) license; maintainers = [ lib.maintainers.vbgl ]; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +})