diff --git a/pkgs/development/ocaml-modules/pgocaml/default.nix b/pkgs/development/ocaml-modules/pgocaml/default.nix index a8b3ed15862..f4d1ef829bb 100644 --- a/pkgs/development/ocaml-modules/pgocaml/default.nix +++ b/pkgs/development/ocaml-modules/pgocaml/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, buildOcaml, calendar, csv, re }: +{ stdenv, fetchurl, buildOcaml, ocaml, calendar, csv, re }: + +if !stdenv.lib.versionAtLeast ocaml.version "4" +then throw "pgocaml is not available for OCaml ${ocaml.version}" +else buildOcaml { name = "pgocaml";