1 { lib, fetchurl, buildDunePackage, ocaml
3 if lib.versionAtLeast ocaml.version "4.07"
4 then if lib.versionAtLeast ocaml.version "4.08"
5 then if lib.versionAtLeast ocaml.version "4.11"
6 then "0.30.0" else "0.24.0" else "0.15.0" else "0.13.0"
7 , ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
8 , stdlib-shims, ocaml-migrate-parsetree-2
13 sha256 = "sha256-pct57oO7qAMEtlvEfymFOCvviWaLG0b5/7NzTC8vdSE=";
16 OMP = [ ocaml-migrate-parsetree ];
19 sha256 = "sha256-geHz0whQDg5/YQjVsN2iuHlkClwh7z3Eqb2QOBzuOdk=";
22 OMP = [ ocaml-migrate-parsetree ];
25 sha256 = "sha256-C2MNf410qJmlXMJxiLXOA+c1qT8H6gwt5WUy2P2TszA=";
28 OMP = [ ocaml-migrate-parsetree ];
31 sha256 = "sha256-nUg8NkZ64GHHDfcWbtFGXq3MNEKu+nYPtcVDm/gEfcM=";
34 OMP = [ ocaml-migrate-parsetree-2 ];
37 sha256 = "sha256-PuuR4DlmZiKEoyIuYS3uf0+it2N8U9lXLSp0E0u5bXo=";
40 OMP = [ ocaml-migrate-parsetree-2 ];
43 sha256 = "sha256-0Oih69xiILFXTXqSbwCEYMURjM73m/mgzgJC80z/Ilo=";
46 OMP = [ ocaml-migrate-parsetree-2 ];
49 sha256 = "sha256-G1g2wYa51aFqz0falPOWj08ItRm3cpzYao/TmXH+EuU=";
54 sha256 = "sha256-d2YCfC7ND1s7Rg6SEqcHCcZ0QngRPrkfMXxWxB56kMg=";
59 sha256 = "sha256-2Hrl+aCBIGMIypZICbUKZq646D0lSAHouWdUSLYM83c=";
64 sha256 = "sha256-3UpjvenSm0mBDgTXZTk3yTLxd6lByg4ZgratU6xEIRA=";
69 if param ? max_version && lib.versionAtLeast ocaml.version param.max_version
70 || param ? min_version && lib.versionOlder ocaml.version param.min_version
71 then throw "ppxlib-${version} is not available for OCaml ${ocaml.version}"
74 buildDunePackage rec {
78 duneVersion = if param.useDune2 or true then "3" else "1";
81 url = "https://github.com/ocaml-ppx/ppxlib/releases/download/${version}/ppxlib-${version}.tbz";
82 inherit (param) sha256;
85 propagatedBuildInputs = [
87 ] ++ (param.OMP or []) ++ [
94 description = "Comprehensive ppx tool set";
95 license = lib.licenses.mit;
96 maintainers = [ lib.maintainers.vbgl ];
97 homepage = "https://github.com/ocaml-ppx/ppxlib";