summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2020-12-08 21:50:10 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2020-12-18 21:03:56 +0100
commitc2e90c4433dacac61fd8f61ce6171c54acab2fc2 (patch)
tree0a1d95c315995bdae6df5662e445fd7ce7fea0ce
parent1dc15448b4cd771dc418ea89438b10c95e189dcd (diff)
ocamlformat: build legacy versions with OCaml 4.07
-rw-r--r--pkgs/development/tools/ocaml/ocamlformat/generic.nix8
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 {