Skip to content

Commit

Permalink
Merge pull request #324790 from zazedd/ocamlPackages-gitlab
Browse files Browse the repository at this point in the history
ocamlPackages.gitlab: init at 0.1.8
  • Loading branch information
superherointj authored Jul 6, 2024
2 parents 61cd40a + c1ee3e7 commit 7132c83
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22320,6 +22320,12 @@
githubId = 250877;
name = "Elmar Athmer";
};
zazedd = {
name = "Leonardo Santos";
email = "[email protected]";
github = "zazedd";
githubId = 93401987;
};
zbioe = {
name = "Iury Fukuda";
email = "[email protected]";
Expand Down
47 changes: 47 additions & 0 deletions pkgs/development/ocaml-modules/gitlab/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
lib,
buildDunePackage,
fetchFromGitHub,
uri,
cohttp-lwt,
atdgen,
yojson,
iso8601,
stringext,
}:

buildDunePackage rec {
pname = "gitlab";
version = "0.1.8";

src = fetchFromGitHub {
owner = "tmcgilchrist";
repo = "ocaml-gitlab";
rev = version;
hash = "sha256-7pUpH1SoP4eW8ild5j+Tcy+aTXq0+eSkhKUOXJ6Z30k=";
};

minimalOCamlVersion = "4.08";

buildInputs = [ stringext ];

nativeBuildInputs = [ atdgen ];

propagatedBuildInputs = [
uri
cohttp-lwt
atdgen
yojson
iso8601
];

doCheck = true;

meta = with lib; {
homepage = "https://github.com/tmcgilchrist/ocaml-gitlab";
description = "Native OCaml bindings to Gitlab REST API v4";
license = licenses.bsd3;
changelog = "https://github.com/tmcgilchrist/ocaml-gitlab/releases/tag/${version}";
maintainers = with maintainers; [ zazedd ];
};
}
28 changes: 28 additions & 0 deletions pkgs/development/ocaml-modules/gitlab/jsoo.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
lib,
buildDunePackage,
gitlab,
cohttp,
cohttp-lwt-jsoo,
js_of_ocaml-lwt,
}:

buildDunePackage {
pname = "gitlab-jsoo";
inherit (gitlab) version src;

minimalOCamlVersion = "4.08";

propagatedBuildInputs = [
gitlab
cohttp
cohttp-lwt-jsoo
js_of_ocaml-lwt
];

doCheck = true;

meta = gitlab.meta // {
description = "Gitlab APIv4 JavaScript library";
};
}
44 changes: 44 additions & 0 deletions pkgs/development/ocaml-modules/gitlab/unix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
lib,
buildDunePackage,
gitlab,
cmdliner,
cohttp,
cohttp-lwt-unix,
tls,
lwt,
stringext,
alcotest,
}:

buildDunePackage {
pname = "gitlab-unix";
inherit (gitlab) version src;

minimalOCamlVersion = "4.08";

postPatch = ''
substituteInPlace unix/dune --replace-fail "gitlab bytes" "gitlab"
'';

buildInputs = [
cohttp
tls
stringext
];

propagatedBuildInputs = [
gitlab
cmdliner
cohttp-lwt-unix
lwt
];

checkInputs = [ alcotest ];

doCheck = true;

meta = gitlab.meta // {
description = "Gitlab APIv4 Unix library";
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,10 @@ let
github-jsoo = callPackage ../development/ocaml-modules/github/jsoo.nix { };
github-unix = callPackage ../development/ocaml-modules/github/unix.nix { };

gitlab = callPackage ../development/ocaml-modules/gitlab { };
gitlab-jsoo = callPackage ../development/ocaml-modules/gitlab/jsoo.nix { };
gitlab-unix = callPackage ../development/ocaml-modules/gitlab/unix.nix { };

gluon = callPackage ../development/ocaml-modules/gluon { };

gluten = callPackage ../development/ocaml-modules/gluten { };
Expand Down

0 comments on commit 7132c83

Please sign in to comment.