From 3bece16153b37c974ddece47c628aa50853787bb Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Fri, 12 Mar 2021 16:29:02 +0100 Subject: [PATCH] ocamlformat: 0.16.0 -> 0.17.0 Adds 'ocamlformat_0_17_0' and update 'ocamlformat'. --- .../tools/ocaml/ocamlformat/default.nix | 6 ++++- .../tools/ocaml/ocamlformat/generic.nix | 26 +++++++++++++++++-- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/ocaml/ocamlformat/default.nix b/pkgs/development/tools/ocaml/ocamlformat/default.nix index 57061cfe126c..c3b4182a0b51 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/default.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/default.nix @@ -48,5 +48,9 @@ rec { version = "0.16.0"; }; - ocamlformat = ocamlformat_0_16_0; + ocamlformat_0_17_0 = mkOCamlformat { + version = "0.17.0"; + }; + + ocamlformat = ocamlformat_0_17_0; } diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix index 24527fcf41af..69f26c5b8877 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/generic.nix @@ -20,6 +20,7 @@ let src = "0.15.0" = "0190vz59n6ma9ca1m3syl3mc8i1smj1m3d8x1jp21f710y4llfr6"; "0.15.1" = "1x6fha495sgk4z05g0p0q3zfqm5l6xzmf6vjm9g9g7c820ym2q9a"; "0.16.0" = "1vwjvvwha0ljc014v8jp8snki5zsqxlwd7x0dl0rg2i9kcmwc4mr"; + "0.17.0" = "0f1lxp697yq61z8gqxjjaqd2ns8fd1vjfggn55x0gh9dx098p138"; }."${version}"; } ; in @@ -36,12 +37,33 @@ buildDunePackage rec { pname = "ocamlformat"; inherit src version; - minimumOCamlVersion = "4.06"; + minimumOCamlVersion = + if lib.versionAtLeast version "0.17.0" + then "4.08" + else "4.06"; useDune2 = true; buildInputs = - if lib.versionAtLeast version "0.15.1" + if lib.versionAtLeast version "0.17.0" + then [ + base + cmdliner + fpath + odoc + re + stdio + uuseg + uutf + fix + menhir + dune-build-info + ocaml-version + # Changed since 0.16.0: + (ppxlib.override { version = "0.22.0"; }) + ocaml-migrate-parsetree-2-1 + ] + else if lib.versionAtLeast version "0.15.1" then [ base cmdliner diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f5c10e319a70..1b03aa043a36 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10810,7 +10810,7 @@ in ocamlformat # latest version ocamlformat_0_11_0 ocamlformat_0_12 ocamlformat_0_13_0 ocamlformat_0_14_0 ocamlformat_0_14_1 ocamlformat_0_14_2 ocamlformat_0_14_3 ocamlformat_0_15_0 - ocamlformat_0_15_1 ocamlformat_0_16_0; + ocamlformat_0_15_1 ocamlformat_0_16_0 ocamlformat_0_17_0; orc = callPackage ../development/compilers/orc { };