ocamlPackages.nonstd: pin Dune version
and disable for OCaml ≥ 5.0
This commit is contained in:
parent
b293a401eb
commit
6009fd8178
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
||||||
{ lib, fetchzip, buildDunePackage, ocaml }:
|
{ lib, fetchzip, buildDunePackage, ocaml }:
|
||||||
|
|
||||||
|
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
|
||||||
|
"nonstd is not available for OCaml ≥ 5.0"
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
pname = "nonstd";
|
pname = "nonstd";
|
||||||
version = "0.0.3";
|
version = "0.0.3";
|
||||||
|
@ -11,8 +14,8 @@ buildDunePackage rec {
|
||||||
sha256 = "0ccjwcriwm8fv29ij1cnbc9win054kb6pfga3ygzdbjpjb778j46";
|
sha256 = "0ccjwcriwm8fv29ij1cnbc9win054kb6pfga3ygzdbjpjb778j46";
|
||||||
};
|
};
|
||||||
|
|
||||||
useDune2 = lib.versionAtLeast ocaml.version "4.12";
|
duneVersion = if lib.versionAtLeast ocaml.version "4.12" then "2" else "1";
|
||||||
postPatch = lib.optionalString useDune2 "dune upgrade";
|
postPatch = lib.optionalString (duneVersion != "1") "dune upgrade";
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue