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 | |
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')
-rw-r--r-- | pkgs/development/ocaml-modules/cohttp/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ppx_deriving/default.nix | 21 |
2 files changed, 18 insertions, 7 deletions
diff --git a/pkgs/development/ocaml-modules/cohttp/default.nix b/pkgs/development/ocaml-modules/cohttp/default.nix index adde3094e27f9..3e571dd791ad4 100644 --- a/pkgs/development/ocaml-modules/cohttp/default.nix +++ b/pkgs/development/ocaml-modules/cohttp/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, ocaml, findlib, jbuilder -, ppx_fields_conv, ppx_sexp_conv +, ppx_fields_conv, ppx_sexp_conv, ppx_deriving , base64, fieldslib, jsonm, logs, re, stringext, uri }: @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml findlib jbuilder jsonm ppx_fields_conv ppx_sexp_conv ]; - propagatedBuildInputs = [ base64 fieldslib re stringext uri ]; + propagatedBuildInputs = [ ppx_deriving base64 fieldslib re stringext uri ]; buildPhase = "jbuilder build -p cohttp"; diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix index 57a423a803733..1b209e523699a 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"; }; } |