diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2020-12-08 21:50:10 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2020-12-18 21:03:56 +0100 |
commit | c2e90c4433dacac61fd8f61ce6171c54acab2fc2 (patch) | |
tree | 0a1d95c315995bdae6df5662e445fd7ce7fea0ce | |
parent | 1dc15448b4cd771dc418ea89438b10c95e189dcd (diff) |
ocamlformat: build legacy versions with OCaml 4.07
-rw-r--r-- | pkgs/development/tools/ocaml/ocamlformat/generic.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix index 59c77f6e142a..8fac26c2b3e8 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/generic.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, fetchzip, ocamlPackages +{ lib, fetchurl, fetchzip, ocaml-ng , version , tarballName ? "ocamlformat-${version}.tbz", }: @@ -22,6 +22,12 @@ let src = } ; in +let ocamlPackages = + if lib.versionAtLeast version "0.14.3" + then ocaml-ng.ocamlPackages + else ocaml-ng.ocamlPackages_4_07 +; in + with ocamlPackages; buildDunePackage rec { |