forked from mirrors/nixpkgs
ppxlib: default to 0.28.0 for OCaml ≥ 4.11 only
This commit is contained in:
parent
15b6e9efd4
commit
d6c30bbf70
|
@ -11,7 +11,7 @@ buildDunePackage rec {
|
|||
sha256 = "sha256-pOeeSxzUF1jXQjA71atSZALdgQ2NB9qpKo5iaDnPwhQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
patches = lib.optionals (lib.versionAtLeast ppxlib.version "0.26.0") [
|
||||
# Ppxlib >= 0.26.0 compatibility
|
||||
# remove when a new version is released
|
||||
(fetchpatch {
|
||||
|
@ -26,8 +26,7 @@ buildDunePackage rec {
|
|||
})
|
||||
];
|
||||
|
||||
minimumOCamlVersion = "4.08";
|
||||
useDune2 = true;
|
||||
minimalOCamlVersion = "4.08";
|
||||
|
||||
buildInputs = [
|
||||
cmdliner
|
||||
|
|
|
@ -18,7 +18,7 @@ buildDunePackage rec {
|
|||
sha256 = "sha256-0FKKYPbSBza/Q6oZniq/UHi5zBjD/i7j5ds3ZDWkBTs=";
|
||||
};
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
minimalOCamlVersion = "4.11";
|
||||
|
||||
propagatedBuildInputs = [ ojs ppxlib ];
|
||||
checkInputs = [ js_of_ocaml-compiler nodejs ];
|
||||
|
|
|
@ -12,7 +12,7 @@ buildDunePackage rec {
|
|||
pname = "ppx_deriving_cmdliner";
|
||||
version = "0.6.1";
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
minimalOCamlVersion = "4.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hammerlab";
|
||||
|
|
|
@ -2,9 +2,19 @@
|
|||
, ppx_deriving, yojson
|
||||
}:
|
||||
|
||||
let param =
|
||||
if lib.versionAtLeast ppxlib.version "0.26" then {
|
||||
version = "3.7.0";
|
||||
sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k=";
|
||||
} else {
|
||||
version = "3.6.1";
|
||||
sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk";
|
||||
}
|
||||
; in
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "ppx_deriving_yojson";
|
||||
version = "3.7.0";
|
||||
inherit (param) version;
|
||||
|
||||
minimalOCamlVersion = "4.07";
|
||||
|
||||
|
@ -12,7 +22,7 @@ buildDunePackage rec {
|
|||
owner = "ocaml-ppx";
|
||||
repo = "ppx_deriving_yojson";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k=";
|
||||
inherit (param) sha256;
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ ppxlib ppx_deriving yojson ];
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
, version ?
|
||||
if lib.versionAtLeast ocaml.version "4.07"
|
||||
then if lib.versionAtLeast ocaml.version "4.08"
|
||||
then "0.28.0" else "0.15.0" else "0.13.0"
|
||||
then if lib.versionAtLeast ocaml.version "4.11"
|
||||
then "0.28.0" else "0.24.0" else "0.15.0" else "0.13.0"
|
||||
, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
|
||||
, stdlib-shims, ocaml-migrate-parsetree-2
|
||||
}:
|
||||
|
|
|
@ -8,6 +8,16 @@
|
|||
, uchar
|
||||
}:
|
||||
|
||||
let param =
|
||||
if lib.versionAtLeast ppxlib.version "0.26.0" then {
|
||||
version = "2.6";
|
||||
sha256 = "sha256-AU+dV+jTG9v3BXzip2Bnv04Ewyo3pyUglDDBFsOsFf0=";
|
||||
} else {
|
||||
version = "2.5";
|
||||
sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy";
|
||||
}
|
||||
; in
|
||||
|
||||
let
|
||||
unicodeVersion = "15.0.0";
|
||||
baseUrl = "https://www.unicode.org/Public/${unicodeVersion}";
|
||||
|
@ -27,7 +37,7 @@ let
|
|||
in
|
||||
buildDunePackage rec {
|
||||
pname = "sedlex";
|
||||
version = "2.6";
|
||||
inherit (param) version;
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
|
||||
|
@ -35,7 +45,7 @@ buildDunePackage rec {
|
|||
owner = "ocaml-community";
|
||||
repo = "sedlex";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AU+dV+jTG9v3BXzip2Bnv04Ewyo3pyUglDDBFsOsFf0=";
|
||||
inherit (param) sha256;
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
Loading…
Reference in a new issue