Skip to content

Commit

Permalink
ocamlPackages.ppxlib: Add version 0.18.0
Browse files Browse the repository at this point in the history
The default version is still 0.15.0 to avoid breaking other packages.
  • Loading branch information
Julow authored and vbgl committed Jan 22, 2021
1 parent f89e4d7 commit be14c20
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions pkgs/development/ocaml-modules/ppxlib/default.nix
@@ -1,21 +1,29 @@
{ lib, fetchFromGitHub, buildDunePackage, ocaml
, version ? if lib.versionAtLeast ocaml.version "4.07" then "0.15.0" else "0.13.0"
, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
, stdlib-shims
, stdlib-shims, ocaml-migrate-parsetree-2-1
}:

let param = {
"0.8.1" = {
sha256 = "0vm0jajmg8135scbg0x60ivyy5gzv4abwnl7zls2mrw23ac6kml6";
max_version = "4.10";
useDune2 = false;
useOMP2 = false;
};
"0.13.0" = {
sha256 = "0c54g22pm6lhfh3f7s5wbah8y48lr5lj3cqsbvgi99bly1b5vqvl";
useDune2 = false;
useOMP2 = false;
};
"0.15.0" = {
sha256 = "1p037kqj5858xrhh0dps6vbf4fnijla6z9fjz5zigvnqp4i2xkrn";
min_version = "4.07";
useDune2 = true;
useOMP2 = false;
};
"0.18.0" = {
sha256 = "1ciy6va2gjrpjs02kha83pzh0x1gkmfsfsdgabbs1v14a8qgfibm";
min_version = "4.07";
};
}."${version}"; in

Expand All @@ -28,7 +36,7 @@ buildDunePackage rec {
pname = "ppxlib";
inherit version;

useDune2 = param.useDune2 or false;
useDune2 = param.useDune2 or true;

src = fetchFromGitHub {
owner = "ocaml-ppx";
Expand All @@ -38,7 +46,12 @@ buildDunePackage rec {
};

propagatedBuildInputs = [
ocaml-compiler-libs ocaml-migrate-parsetree ppx_derivers stdio
ocaml-compiler-libs
(if param.useOMP2 or true
then ocaml-migrate-parsetree-2-1
else ocaml-migrate-parsetree)
ppx_derivers
stdio
stdlib-shims
];

Expand Down

0 comments on commit be14c20

Please sign in to comment.