From c09e680e77bb7b7df35381a67e2ede035fea398f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 6 Dec 2019 06:19:04 +0000 Subject: [PATCH] ocamlPackages.graphql-cohttp: init at 0.13.0 --- .../ocaml-modules/graphql/cohttp.nix | 24 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/graphql/cohttp.nix diff --git a/pkgs/development/ocaml-modules/graphql/cohttp.nix b/pkgs/development/ocaml-modules/graphql/cohttp.nix new file mode 100644 index 00000000000..c6e85da77f3 --- /dev/null +++ b/pkgs/development/ocaml-modules/graphql/cohttp.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, ocaml-crunch +, astring, cohttp, digestif, graphql, ocplib-endian +, alcotest, cohttp-lwt-unix, graphql-lwt +}: + +buildDunePackage rec { + pname = "graphql-cohttp"; + + inherit (graphql) version src; + + nativeBuildInputs = [ ocaml-crunch ]; + propagatedBuildInputs = [ astring cohttp digestif graphql ocplib-endian ]; + + checkInputs = lib.optionals doCheck [ alcotest cohttp-lwt-unix graphql-lwt ]; + + doCheck = true; + + meta = graphql.meta // { + description = "Run GraphQL servers with “cohttp”"; + }; + +} + + diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 77277b6b88b..e583ccb9a82 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -350,6 +350,8 @@ let graphql = callPackage ../development/ocaml-modules/graphql { }; + graphql-cohttp = callPackage ../development/ocaml-modules/graphql/cohttp.nix { }; + graphql-lwt = callPackage ../development/ocaml-modules/graphql/lwt.nix { }; graphql_parser = callPackage ../development/ocaml-modules/graphql/parser.nix { };