about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix
blob: 8d4bd4c82b3907f704792e3c767d6db67a735c63 (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
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg
, asn1-combinators, astring, nocrypto, ppx_sexp_conv
, ounit, cstruct-unix
}:

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-x509-${version}";
  version = "0.6.1";

  src = fetchurl {
    url = "https://github.com/mirleft/ocaml-x509/releases/download/${version}/x509-${version}.tbz";
    sha256 = "1c62mw9rnzq0rs3ihbhfs18nv4mdzwag7893hlqgji3wmaai70pk";
  };

  buildInputs = [ ocaml findlib ocamlbuild topkg ppx_sexp_conv ounit cstruct-unix ];
  propagatedBuildInputs = [ asn1-combinators astring nocrypto ];

  buildPhase = "${topkg.run} build --tests true";

  doCheck = true;
  checkPhase = "${topkg.run} test";

  inherit (topkg) installPhase;

  meta = with stdenv.lib; {
    homepage = https://github.com/mirleft/ocaml-x509;
    description = "X509 (RFC5280) handling in OCaml";
    license = licenses.bsd2;
    maintainers = with maintainers; [ vbgl ];
  };
}