2018-01-15 04:01:50 +00:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg
|
|
|
|
, asn1-combinators, astring, nocrypto, ppx_sexp_conv
|
|
|
|
, ounit, cstruct-unix
|
2017-11-27 19:08:40 +00:00
|
|
|
}:
|
2015-10-17 23:13:16 +01:00
|
|
|
|
2018-01-15 04:01:50 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-x509-${version}";
|
|
|
|
version = "0.6.1";
|
2015-10-17 23:13:16 +01:00
|
|
|
|
2018-01-15 04:01:50 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirleft/ocaml-x509/releases/download/${version}/x509-${version}.tbz";
|
|
|
|
sha256 = "1c62mw9rnzq0rs3ihbhfs18nv4mdzwag7893hlqgji3wmaai70pk";
|
2015-10-17 23:13:16 +01:00
|
|
|
};
|
|
|
|
|
2018-01-15 04:01:50 +00:00
|
|
|
unpackCmd = "tar -xjf $curSrc";
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild topkg ppx_sexp_conv ounit cstruct-unix ];
|
|
|
|
propagatedBuildInputs = [ asn1-combinators astring nocrypto ];
|
2015-10-17 23:13:16 +01:00
|
|
|
|
2018-01-15 04:01:50 +00:00
|
|
|
buildPhase = "${topkg.run} build --tests true";
|
2016-11-03 00:15:35 +00:00
|
|
|
|
2015-10-17 23:13:16 +01:00
|
|
|
doCheck = true;
|
2018-01-15 04:01:50 +00:00
|
|
|
checkPhase = "${topkg.run} test";
|
|
|
|
|
|
|
|
inherit (topkg) installPhase;
|
2015-10-17 23:13:16 +01:00
|
|
|
|
2016-11-03 00:15:35 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-10-17 23:13:16 +01:00
|
|
|
homepage = https://github.com/mirleft/ocaml-x509;
|
|
|
|
description = "X509 (RFC5280) handling in OCaml";
|
2016-11-03 00:15:35 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ vbgl ];
|
2015-10-17 23:13:16 +01:00
|
|
|
};
|
|
|
|
}
|