1{
2 lib,
3 buildDunePackage,
4 fetchFromGitHub,
5 uri,
6 cohttp-lwt,
7 atdgen,
8 atdgen-runtime,
9 yojson,
10 iso8601,
11 stringext,
12}:
13
14buildDunePackage rec {
15 pname = "gitlab";
16 version = "0.1.8";
17
18 src = fetchFromGitHub {
19 owner = "tmcgilchrist";
20 repo = "ocaml-gitlab";
21 rev = version;
22 hash = "sha256-7pUpH1SoP4eW8ild5j+Tcy+aTXq0+eSkhKUOXJ6Z30k=";
23 };
24
25 postPatch = ''
26 substituteInPlace lib/dune --replace-warn 'atdgen str' 'atdgen-runtime str'
27 '';
28
29 minimalOCamlVersion = "4.08";
30
31 buildInputs = [ stringext ];
32
33 nativeBuildInputs = [ atdgen ];
34
35 propagatedBuildInputs = [
36 uri
37 cohttp-lwt
38 atdgen-runtime
39 yojson
40 iso8601
41 ];
42
43 doCheck = true;
44
45 meta = with lib; {
46 homepage = "https://github.com/tmcgilchrist/ocaml-gitlab";
47 description = "Native OCaml bindings to Gitlab REST API v4";
48 license = licenses.bsd3;
49 changelog = "https://github.com/tmcgilchrist/ocaml-gitlab/releases/tag/${version}";
50 maintainers = with maintainers; [ zazedd ];
51 };
52}