about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ptime
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2023-09-25 06:55:23 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2023-09-25 06:58:20 +0200
commit48e2e83db5ae5bb915d5956ba198ea0fb02f3b61 (patch)
tree2788d48534a3a8527145d63dc8f3300b0900c74f /pkgs/development/ocaml-modules/ptime
parent0a017f947fc9a060bfdd79a8e885f1d54fd8a592 (diff)
ocamlPackages.ptime: fix evaluation
Evaluation must fail and not silently return the bogus null value.
Diffstat (limited to 'pkgs/development/ocaml-modules/ptime')
-rw-r--r--pkgs/development/ocaml-modules/ptime/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/ptime/default.nix b/pkgs/development/ocaml-modules/ptime/default.nix
index 9c1914b0f322c..1f23194582a0c 100644
--- a/pkgs/development/ocaml-modules/ptime/default.nix
+++ b/pkgs/development/ocaml-modules/ptime/default.nix
@@ -7,6 +7,9 @@
 , topkg
 }:
 
+lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
+  "ptime is not available for OCaml ${ocaml.version}"
+
 stdenv.mkDerivation (finalAttrs: {
   version = "1.1.0";
   pname = "ocaml${ocaml.version}-ptime";