From c2e90c4433dacac61fd8f61ce6171c54acab2fc2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 8 Dec 2020 21:50:10 +0100 Subject: [PATCH] ocamlformat: build legacy versions with OCaml 4.07 --- pkgs/development/tools/ocaml/ocamlformat/generic.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix index 59c77f6e142..8fac26c2b3e 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 {