diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2020-02-16 15:24:43 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2020-02-24 09:48:13 +0100 |
commit | 6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb (patch) | |
tree | fb29b2ad1ac9521bde5fd5f5858291a341c6844c /pkgs/development/ocaml-modules/ppx_tools | |
parent | 193c58489ec31d58cf2bbb66ea9aeec0ef4d51a8 (diff) | |
download | nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.tar nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.tar.gz nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.tar.bz2 nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.tar.lz nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.tar.xz nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.tar.zst nixlib-6036633e2b4aefec698d2f7a4cf1ce4c182bc4bb.zip |
ocamlPackages.ppx_tools: 5.3 → 6.{0,1}
Diffstat (limited to 'pkgs/development/ocaml-modules/ppx_tools')
-rw-r--r-- | pkgs/development/ocaml-modules/ppx_tools/default.nix | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix index 984906342bc5..8173fc87aba1 100644 --- a/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib }: +{ stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib }: let param = { "4.02" = { @@ -24,18 +24,39 @@ let param = { version = "5.3+4.08.0"; sha256 = "0vdmhs3hpmh5iclx4lzgdpf362m4l35zprxs73r84z1yhr4jcr4m"; }; "4.09" = { - version = "5.3+4.08.0"; - sha256 = "0vdmhs3hpmh5iclx4lzgdpf362m4l35zprxs73r84z1yhr4jcr4m"; }; + version = "6.0+4.08.0"; + sha256 = "056cmdajap8mbb8k0raj0cq0y4jf7pf5x0hlivm92w2v7xxf59ns"; }; + "4.10" = { + version = "6.1+4.10.0"; + sha256 = "0ccx2g4zpwnv52bbzhgxji1nvzmn80jwiqalwwc4s60i9qg51llw"; }; }.${ocaml.meta.branch}; in - stdenv.mkDerivation { - name = "ocaml${ocaml.version}-ppx_tools-${param.version}"; - src = fetchFromGitHub { + +let src = fetchFromGitHub { owner = "alainfrisch"; - repo = "ppx_tools"; - rev = if param ? rev then param.rev else param.version; + repo = pname; + rev = param.rev or param.version; inherit (param) sha256; }; + pname = "ppx_tools"; + meta = with stdenv.lib; { + description = "Tools for authors of ppx rewriters"; + homepage = http://www.lexifi.com/ppx_tools; + license = licenses.mit; + maintainers = with maintainers; [ vbgl ]; + }; +in +if stdenv.lib.versionAtLeast param.version "6.0" +then + buildDunePackage { + inherit pname src meta; + inherit (param) version; + } +else + stdenv.mkDerivation { + name = "ocaml${ocaml.version}-${pname}-${param.version}"; + + inherit src; nativeBuildInputs = [ ocaml findlib ]; buildInputs = [ ocaml findlib ]; @@ -44,11 +65,5 @@ in dontStrip = true; - meta = with stdenv.lib; { - description = "Tools for authors of ppx rewriters"; - homepage = http://www.lexifi.com/ppx_tools; - license = licenses.mit; - platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ vbgl ]; - }; + meta = meta // { inherit (ocaml.meta) platforms; }; } |