ocamlPackages.buildDunePackage: deprecate useDune2
This commit is contained in:
parent
8607b0587c
commit
caf436a52b
|
@ -38,12 +38,12 @@ Here is a simple package example.
|
||||||
|
|
||||||
- It uses the `fetchFromGitHub` fetcher to get its source.
|
- It uses the `fetchFromGitHub` fetcher to get its source.
|
||||||
|
|
||||||
- `duneVersion = "2"` ensures that Dune version 2 is used for the
|
- It also accept `duneVersion` parameter (valid value are `"1"`, `"2"`, and
|
||||||
build (this is the default; valid values are `"1"`, `"2"`, and `"3"`);
|
`"3"`). The recommended practice it to set only if you don't want the default
|
||||||
note that there is also a legacy `useDune2` boolean attribute:
|
value and/or it depends on something else like package version. You might see
|
||||||
set to `false` it corresponds to `duneVersion = "1"`; set to `true` it
|
a not-supported argument `useDune2`. The behavior was `useDune2 = true;` =>
|
||||||
corresponds to `duneVersion = "2"`. If both arguments (`duneVersion` and
|
`duneVersion = "2";` and `useDune2 = false;` => `duneVersion = "1";`. It was
|
||||||
`useDune2`) are given, the second one (`useDune2`) is silently ignored.
|
used at the time when dune3 didn't existed.
|
||||||
|
|
||||||
- It sets the optional `doCheck` attribute such that tests will be run with
|
- 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
|
`dune runtest -p angstrom` after the build (`dune build -p angstrom`) is
|
||||||
|
@ -71,7 +71,6 @@ Here is a simple package example.
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
pname = "angstrom";
|
pname = "angstrom";
|
||||||
version = "0.15.0";
|
version = "0.15.0";
|
||||||
duneVersion = "2";
|
|
||||||
|
|
||||||
minimalOCamlVersion = "4.04";
|
minimalOCamlVersion = "4.04";
|
||||||
|
|
||||||
|
@ -104,8 +103,6 @@ buildDunePackage rec {
|
||||||
pname = "wtf8";
|
pname = "wtf8";
|
||||||
version = "1.0.2";
|
version = "1.0.2";
|
||||||
|
|
||||||
useDune2 = true;
|
|
||||||
|
|
||||||
minimalOCamlVersion = "4.02";
|
minimalOCamlVersion = "4.02";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
|
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
|
||||||
|
|
||||||
let Dune =
|
let Dune =
|
||||||
let dune-version = args . duneVersion or (if args.useDune2 or true then "2" else "1"); in
|
let dune-version = args.duneVersion or "2"; in
|
||||||
{ "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}"
|
{ "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}"
|
||||||
; in
|
; in
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
} // (builtins.removeAttrs args [ "minimalOCamlVersion" "duneVersion" ]) // {
|
} // (builtins.removeAttrs args [ "minimalOCamlVersion" "duneVersion" ]) // {
|
||||||
|
|
||||||
name = "ocaml${ocaml.version}-${pname}-${version}";
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue