buildDunePackage: use dune_2 by default

This commit is contained in:
Vincent Laporte 2022-03-13 15:39:14 +01:00 committed by Vincent Laporte
parent 4d10c11d98
commit b5359c444e
9 changed files with 21 additions and 7 deletions

View file

@ -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

View file

@ -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)

View file

@ -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";

View file

@ -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 ];

View file

@ -5,7 +5,9 @@
buildDunePackage (args // {
inherit version buildInputs;
minimumOCamlVersion = "4.04";
useDune2 = false;
minimalOCamlVersion = "4.04";
src = fetchFromGitHub {
owner = "janestreet";

View file

@ -5,6 +5,8 @@
buildDunePackage (args // {
inherit version;
useDune2 = false;
minimalOCamlVersion = "4.07";
src = fetchFromGitHub {

View file

@ -11,7 +11,9 @@ buildDunePackage rec {
sha256 = "1lv8z6ljfy47yvxmwf5jrvc5d3dc90r1n291x53j161sf22ddrk9";
};
minimumOCamlVersion = "4.02";
useDune2 = false;
minimalOCamlVersion = "4.02";
propagatedBuildInputs = [ camlp4 ];

View file

@ -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";

View file

@ -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";