Unverified Commit d6c30bbf authored by Vincent Laporte's avatar Vincent Laporte
Browse files

ppxlib: default to 0.28.0 for OCaml ≥ 4.11 only

parent 15b6e9ef
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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 ];
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ buildDunePackage rec {
  pname = "ppx_deriving_cmdliner";
  version = "0.6.1";

  minimalOCamlVersion = "4.08";
  minimalOCamlVersion = "4.11";

  src = fetchFromGitHub {
    owner = "hammerlab";
+12 −2
Original line number Diff line number Diff line
@@ -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 −1
Original line number Diff line number Diff line
@@ -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
}:
Loading