summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/logs
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2022-08-23 08:04:50 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2022-08-31 07:36:39 +0200
commit0f4f35c7b05a559bee99bb2be45f850af8e3bda8 (patch)
tree4387e317c287a5509e01792ef29e56f5628006e8 /pkgs/development/ocaml-modules/logs
parent30942c90cbdf884dc6df63fbec859ac812e7d9d1 (diff)
downloadnixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.tar
nixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.tar.gz
nixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.tar.bz2
nixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.tar.lz
nixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.tar.xz
nixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.tar.zst
nixpkgs-0f4f35c7b05a559bee99bb2be45f850af8e3bda8.zip
ocamlPackages.fmt: 0.8.9 → 0.9.0
Diffstat (limited to 'pkgs/development/ocaml-modules/logs')
-rw-r--r--pkgs/development/ocaml-modules/logs/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/ocaml-modules/logs/default.nix b/pkgs/development/ocaml-modules/logs/default.nix
index adc7f255b19..0b8ffed91e4 100644
--- a/pkgs/development/ocaml-modules/logs/default.nix
+++ b/pkgs/development/ocaml-modules/logs/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
 , topkg, result, lwt, cmdliner, fmt
+, fmtSupport ? lib.versionAtLeast ocaml.version "4.08"
 , js_of_ocaml
 , jsooSupport ? true
 }:
@@ -22,13 +23,14 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
-  buildInputs = [ fmt cmdliner lwt topkg ]
+  buildInputs = [ cmdliner lwt topkg ]
+    ++ lib.optional fmtSupport fmt
     ++ lib.optional jsooSupport js_of_ocaml;
   propagatedBuildInputs = [ result ];
 
   strictDeps = true;
 
-  buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport}";
+  buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport} --with-fmt ${lib.boolToString fmtSupport}";
 
   inherit (topkg) installPhase;