about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/git/default.nix
blob: 0bf43174412c5bd21c176d0a7e12cd4feafd36f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder
, astring, decompress, fmt, hex, logs, mstruct, ocaml_lwt, ocamlgraph, uri
, alcotest, mtime, nocrypto
}:

stdenv.mkDerivation rec {
	version = "1.11.5";
	name = "ocaml${ocaml.version}-git-${version}";

	src = fetchFromGitHub {
		owner = "mirage";
		repo = "ocaml-git";
		rev = version;
		sha256 = "0r1bxpxjjnl9hh8xbabsxl7svzvd19hfy73a2y1m4kljmw64dpfh";
	};

	buildInputs = [ ocaml findlib jbuilder alcotest mtime nocrypto ];

	propagatedBuildInputs = [ astring decompress fmt hex logs mstruct ocaml_lwt ocamlgraph uri ];

	buildPhase = "jbuilder build -p git";

	inherit (jbuilder) installPhase;

	doCheck = true;
	checkPhase = "jbuilder runtest -p git";

	meta = {
		description = "Git format and protocol in pure OCaml";
		license = stdenv.lib.licenses.isc;
		maintainers = [ stdenv.lib.maintainers.vbgl ];
		inherit (src.meta) homepage;
		inherit (ocaml.meta) platforms;
	};
}