From e7262d704f5e9656e849d9e0dbfa5d7c9755327b Mon Sep 17 00:00:00 2001 From: Niols Date: Wed, 3 May 2023 11:41:44 +0000 Subject: [PATCH] ocamlPackages.github*: init at 4.4.1 --- .../development/ocaml-modules/github/data.nix | 23 +++++++++++++ .../ocaml-modules/github/default.nix | 34 +++++++++++++++++++ .../development/ocaml-modules/github/jsoo.nix | 21 ++++++++++++ .../development/ocaml-modules/github/unix.nix | 23 +++++++++++++ pkgs/top-level/ocaml-packages.nix | 5 +++ 5 files changed, 106 insertions(+) create mode 100644 pkgs/development/ocaml-modules/github/data.nix create mode 100644 pkgs/development/ocaml-modules/github/default.nix create mode 100644 pkgs/development/ocaml-modules/github/jsoo.nix create mode 100644 pkgs/development/ocaml-modules/github/unix.nix diff --git a/pkgs/development/ocaml-modules/github/data.nix b/pkgs/development/ocaml-modules/github/data.nix new file mode 100644 index 000000000000..803642b509dd --- /dev/null +++ b/pkgs/development/ocaml-modules/github/data.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, github +, yojson, atdgen +}: + +buildDunePackage { + pname = "github-data"; + inherit (github) version src; + + duneVersion = "3"; + + nativeBuildInputs = [ + atdgen + ]; + + propagatedBuildInputs = [ + yojson + atdgen + ]; + + meta = github.meta // { + description = "GitHub APIv3 data library"; + }; +} diff --git a/pkgs/development/ocaml-modules/github/default.nix b/pkgs/development/ocaml-modules/github/default.nix new file mode 100644 index 000000000000..ec1816f8e5ad --- /dev/null +++ b/pkgs/development/ocaml-modules/github/default.nix @@ -0,0 +1,34 @@ +{ lib, buildDunePackage, fetchFromGitHub +, uri, cohttp, lwt, cohttp-lwt, github-data, yojson, stringext +}: + +buildDunePackage rec { + pname = "github"; + version = "4.4.1"; + + src = fetchFromGitHub { + owner = "mirage"; + repo = "ocaml-github"; + rev = version; + sha256 = "sha256-psUIiIvjVV2NTlBtHnBisWreaKKnsqIjKT2+mLnfsxg="; + }; + + duneVersion = "3"; + + propagatedBuildInputs = [ + uri + cohttp + lwt + cohttp-lwt + github-data + yojson + stringext + ]; + + meta = with lib; { + homepage = "https://github.com/mirage/ocaml-github"; + description = "GitHub APIv3 OCaml library"; + license = licenses.mit; + maintainers = with maintainers; [ niols ]; + }; +} diff --git a/pkgs/development/ocaml-modules/github/jsoo.nix b/pkgs/development/ocaml-modules/github/jsoo.nix new file mode 100644 index 000000000000..d387d2fbde01 --- /dev/null +++ b/pkgs/development/ocaml-modules/github/jsoo.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, github +, cohttp, cohttp-lwt-jsoo, js_of_ocaml-lwt +}: + +buildDunePackage { + pname = "github-jsoo"; + inherit (github) version src; + + duneVersion = "3"; + + propagatedBuildInputs = [ + github + cohttp + cohttp-lwt-jsoo + js_of_ocaml-lwt + ]; + + meta = github.meta // { + description = "GitHub APIv3 JavaScript library"; + }; +} diff --git a/pkgs/development/ocaml-modules/github/unix.nix b/pkgs/development/ocaml-modules/github/unix.nix new file mode 100644 index 000000000000..3f1897f82870 --- /dev/null +++ b/pkgs/development/ocaml-modules/github/unix.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, github +, cohttp, cohttp-lwt-unix, stringext, cmdliner, lwt +}: + +buildDunePackage { + pname = "github-unix"; + inherit (github) version src; + + duneVersion = "3"; + + propagatedBuildInputs = [ + github + cohttp + cohttp-lwt-unix + stringext + cmdliner + lwt + ]; + + meta = github.meta // { + description = "GitHub APIv3 Unix library"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e17454d9dd6f..0185ed26d42f 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -571,6 +571,11 @@ let git-binary = pkgs.git; }; + github = callPackage ../development/ocaml-modules/github { }; + github-data = callPackage ../development/ocaml-modules/github/data.nix { }; + github-jsoo = callPackage ../development/ocaml-modules/github/jsoo.nix { }; + github-unix = callPackage ../development/ocaml-modules/github/unix.nix { }; + gluten = callPackage ../development/ocaml-modules/gluten { }; gluten-lwt = callPackage ../development/ocaml-modules/gluten/lwt.nix { }; gluten-lwt-unix = callPackage ../development/ocaml-modules/gluten/lwt-unix.nix { };