From 2044e44cf4fe548ebeb9ded83d1a7d9bd4c99601 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 20 Nov 2020 06:40:45 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.ppx=5Fderiving=5Fprotobuf:=20disa?= =?UTF-8?q?ble=20for=20OCaml=20=E2=89=A5=204.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/ppx_deriving_protobuf/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix index 4af711ce395..f85e32d72c7 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;