diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2017-08-28 11:17:22 +0200 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-08-30 02:33:23 +0000 |
commit | a9be3c20d16df5cddbacd5b808b52052ceff6482 (patch) | |
tree | 5f81192ee7932b27a6c9cfa3912fda0418bb2e6b /pkgs/development/ocaml-modules/ppx_deriving/default.nix | |
parent | 2a191ed853c931e6d69ee84a17d56c1bbf633190 (diff) |
ocamlPackages.ppx_deriving: 4.1 -> 4.2
This fixes compilation of ppx_deriving with OCaml 4.05.
js_of_ocaml_2: mark as broken with OCaml 4.05
ocamlPackages.cohttp: propagates ppx_deriving
Diffstat (limited to 'pkgs/development/ocaml-modules/ppx_deriving/default.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/ppx_deriving/default.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix index 57a423a80373..1b209e523699 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix @@ -1,22 +1,34 @@ { stdenv, buildOcaml, ocaml, fetchzip -, cppo, ppx_tools, result, ounit +, cppo, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree }: +let param = + if ocaml.version == "4.03.0" + then { + version = "4.1"; + sha256 = "0cy9p8d8cbcxvqyyv8fz2z9ypi121zrgaamdlp4ld9f3jnwz7my9"; + extraPropagatedBuildInputs = []; + } else { + version = "4.2"; + sha256 = "0scsg45wp6xdqj648fz155r4yngyl2xcd3hdszfzqwdpbax33914"; + extraPropagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ]; +}; in + buildOcaml rec { name = "ppx_deriving"; - version = "4.1"; + inherit (param) version; minimumSupportedOcamlVersion = "4.02"; src = fetchzip { url = "https://github.com/whitequark/${name}/archive/v${version}.tar.gz"; - sha256 = "0cy9p8d8cbcxvqyyv8fz2z9ypi121zrgaamdlp4ld9f3jnwz7my9"; + inherit (param) sha256; }; hasSharedObjects = true; buildInputs = [ cppo ounit ]; - propagatedBuildInputs = + propagatedBuildInputs = param.extraPropagatedBuildInputs ++ [ ppx_tools result ]; installPhase = "OCAMLPATH=$OCAMLPATH:`ocamlfind printconf destdir` make install"; @@ -25,6 +37,5 @@ buildOcaml rec { description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02."; maintainers = [ maintainers.maurer ]; license = licenses.mit; - broken = versionAtLeast ocaml.version "4.05"; }; } |