diff options
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix index 5f3f0916178a..3e06af881c56 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -1,9 +1,11 @@ -{ stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib }: +{ lib, stdenv, fetchFromGitHub, buildDunePackage, ocaml, findlib, cppo }: let param = - let v6_2 = { - version = "6.2"; - sha256 = "0qf4fwnn4hhk52kjw9frv21v23azqnn4mjvwf1hs0nxf7q4kacb5"; + let v6_3 = { + version = "6.3"; + sha256 = "1skf4njvkifwx0qlsrc0jn891gvvcp5ryd6kkpx56hck7nnxv8x6"; + useDune2 = lib.versionAtLeast ocaml.version "4.12"; + buildInputs = [cppo]; }; in { "4.02" = { @@ -25,10 +27,11 @@ let param = "4.07" = { version = "5.1+4.06.0"; sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; }; - "4.08" = v6_2; - "4.09" = v6_2; - "4.10" = v6_2; - "4.11" = v6_2; + "4.08" = v6_3; + "4.09" = v6_3; + "4.10" = v6_3; + "4.11" = v6_3; + "4.12" = v6_3; }.${ocaml.meta.branch}; in @@ -39,18 +42,18 @@ let src = fetchFromGitHub { inherit (param) sha256; }; pname = "ppx_tools"; - meta = with stdenv.lib; { + meta = with lib; { description = "Tools for authors of ppx rewriters"; homepage = "https://www.lexifi.com/ppx_tools"; license = licenses.mit; maintainers = with maintainers; [ vbgl ]; }; in -if stdenv.lib.versionAtLeast param.version "6.0" +if lib.versionAtLeast param.version "6.0" then buildDunePackage { inherit pname src meta; - inherit (param) version; + inherit (param) version useDune2 buildInputs; } else stdenv.mkDerivation { |