diff --git a/doc/languages-frameworks/ocaml.section.md b/doc/languages-frameworks/ocaml.section.md index 47035551d418..e4813d7dd2d4 100644 --- a/doc/languages-frameworks/ocaml.section.md +++ b/doc/languages-frameworks/ocaml.section.md @@ -38,8 +38,8 @@ Here is a simple package example. - It uses the `fetchFromGitHub` fetcher to get its source. -- `useDune2 = true` ensures that the latest version of Dune is used for the - build (this may become the default value in a future release). +- `useDune2 = true` ensures that Dune version 2 is used for the + build (this is the default; set to `false` to use Dune version 1). - It sets the optional `doCheck` attribute such that tests will be run with `dune runtest -p angstrom` after the build (`dune build -p angstrom`) is diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index 6bdec501630e..18e8784cfab3 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -2,7 +2,7 @@ { pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args: -let Dune = if args.useDune2 or false then dune_2 else dune_1; in +let Dune = if args.useDune2 or true then dune_2 else dune_1; in if (args ? minimumOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion) || (args ? minimalOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimalOCamlVersion) diff --git a/pkgs/development/ocaml-modules/facile/default.nix b/pkgs/development/ocaml-modules/facile/default.nix index 8834de53a8fa..df228603e9f4 100644 --- a/pkgs/development/ocaml-modules/facile/default.nix +++ b/pkgs/development/ocaml-modules/facile/default.nix @@ -4,6 +4,8 @@ buildDunePackage rec { pname = "facile"; version = "1.1.4"; + useDune2 = false; + src = fetchurl { url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz"; sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp"; diff --git a/pkgs/development/ocaml-modules/genspio/default.nix b/pkgs/development/ocaml-modules/genspio/default.nix index db3c42bca36c..963cd1dab138 100644 --- a/pkgs/development/ocaml-modules/genspio/default.nix +++ b/pkgs/development/ocaml-modules/genspio/default.nix @@ -6,6 +6,8 @@ buildDunePackage rec { pname = "genspio"; version = "0.0.2"; + useDune2 = false; + src = fetchFromGitHub { owner = "hammerlab"; repo = pname; @@ -13,7 +15,7 @@ buildDunePackage rec { sha256 = "0cp6p1f713sfv4p2r03bzvjvakzn4ili7hf3a952b3w1k39hv37x"; }; - minimumOCamlVersion = "4.03"; + minimalOCamlVersion = "4.03"; propagatedBuildInputs = [ nonstd sosa ]; diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage.nix b/pkgs/development/ocaml-modules/janestreet/janePackage.nix index 63c4a900fced..da2687576015 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage.nix @@ -5,7 +5,9 @@ buildDunePackage (args // { inherit version buildInputs; - minimumOCamlVersion = "4.04"; + useDune2 = false; + + minimalOCamlVersion = "4.04"; src = fetchFromGitHub { owner = "janestreet"; diff --git a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix index 3d280a509acc..5b9186835701 100644 --- a/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix +++ b/pkgs/development/ocaml-modules/janestreet/janePackage_0_12.nix @@ -5,6 +5,8 @@ buildDunePackage (args // { inherit version; + useDune2 = false; + minimalOCamlVersion = "4.07"; src = fetchFromGitHub { diff --git a/pkgs/development/ocaml-modules/lwt/camlp4.nix b/pkgs/development/ocaml-modules/lwt/camlp4.nix index 88bb3d6759a0..e48d7cfa185a 100644 --- a/pkgs/development/ocaml-modules/lwt/camlp4.nix +++ b/pkgs/development/ocaml-modules/lwt/camlp4.nix @@ -11,7 +11,9 @@ buildDunePackage rec { sha256 = "1lv8z6ljfy47yvxmwf5jrvc5d3dc90r1n291x53j161sf22ddrk9"; }; - minimumOCamlVersion = "4.02"; + useDune2 = false; + + minimalOCamlVersion = "4.02"; propagatedBuildInputs = [ camlp4 ]; diff --git a/pkgs/development/ocaml-modules/nonstd/default.nix b/pkgs/development/ocaml-modules/nonstd/default.nix index 9de535154eeb..82b1feed540b 100644 --- a/pkgs/development/ocaml-modules/nonstd/default.nix +++ b/pkgs/development/ocaml-modules/nonstd/default.nix @@ -4,7 +4,9 @@ buildDunePackage rec { pname = "nonstd"; version = "0.0.3"; - minimumOCamlVersion = "4.02"; + useDune2 = false; + + minimalOCamlVersion = "4.02"; src = fetchzip { url = "https://bitbucket.org/smondet/${pname}/get/${pname}.${version}.tar.gz"; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix index a08aaac832e3..39f6d5f7aa2d 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix @@ -6,6 +6,8 @@ buildDunePackage rec { version = "3.2.1"; pname = "js_of_ocaml-camlp4"; + useDune2 = false; + src = fetchFromGitHub { owner = "ocsigen"; repo = "js_of_ocaml";