diff --git a/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix index 4af711ce3950..f85e32d72c7f 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix @@ -1,6 +1,10 @@ -{ stdenv, fetchFromGitHub, buildDunePackage, cppo, ppx_tools, ppx_deriving +{ lib, fetchFromGitHub, buildDunePackage, ocaml, cppo, ppx_tools, ppx_deriving , ppxfind }: +if lib.versionAtLeast ocaml.version "4.11" +then throw "ppx_deriving_protobuf is not available for OCaml ${ocaml.version}" +else + buildDunePackage rec { pname = "ppx_deriving_protobuf"; version = "2.7"; @@ -14,7 +18,7 @@ buildDunePackage rec { buildInputs = [ cppo ppx_tools ppxfind ppx_deriving ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/ocaml-ppx/ppx_deriving_protobuf"; description = "A Protocol Buffers codec generator for OCaml"; license = licenses.mit;