ocamlPackages.tls: 0.10.4 -> 0.11.1
This update contains a switch to the dune build system as well as a switch from nocrypto to mirage-crypto.
This commit is contained in:
parent
4bf689b3e0
commit
99ac3ce2bf
|
@ -1,38 +1,26 @@
|
||||||
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
|
{ stdenv, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct
|
||||||
, ppx_sexp_conv, result, x509, nocrypto, cstruct-sexp, ppx_cstruct, cstruct-unix, ounit
|
, cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng
|
||||||
, lwt ? null}:
|
, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime }:
|
||||||
|
|
||||||
with stdenv.lib;
|
buildDunePackage rec {
|
||||||
|
minimumOCamlVersion = "4.07";
|
||||||
|
|
||||||
let withLwt = lwt != null; in
|
version = "0.11.1";
|
||||||
|
pname = "tls";
|
||||||
|
|
||||||
if !versionAtLeast ocaml.version "4.04"
|
src = fetchurl {
|
||||||
then throw "tls is not available for OCaml ${ocaml.version}"
|
url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz";
|
||||||
else
|
sha256 = "0ms13fbaxgmpbviazlfa4hb7nmi7s22nklc7ns926b0rr1aq1069";
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "0.10.4";
|
|
||||||
name = "ocaml${ocaml.version}-tls-${version}";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "mirleft";
|
|
||||||
repo = "ocaml-tls";
|
|
||||||
rev = version;
|
|
||||||
sha256 = "02wv4lia583imn3sfci4nqv6ac5nzig5j3yfdnlqa0q8bp9rfc6g";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
|
useDune2 = true;
|
||||||
buildInputs = [ findlib topkg ppx_sexp_conv ppx_cstruct ]
|
|
||||||
++ optionals doCheck [ ounit cstruct-unix ];
|
|
||||||
propagatedBuildInputs = [ cstruct-sexp nocrypto result x509 ] ++
|
|
||||||
optional withLwt lwt;
|
|
||||||
|
|
||||||
buildPhase = "${topkg.run} build --tests ${boolToString doCheck} --with-mirage false --with-lwt ${boolToString withLwt}";
|
doCheck = true;
|
||||||
|
buildInputs = [ cstruct-unix ounit2 ];
|
||||||
|
|
||||||
doCheck = versionAtLeast ocaml.version "4.06";
|
propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp
|
||||||
checkPhase = "${topkg.run} test";
|
sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng
|
||||||
|
x509 domain-name fmt ocaml_lwt ptime ];
|
||||||
inherit (topkg) installPhase;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/mirleft/ocaml-tls";
|
homepage = "https://github.com/mirleft/ocaml-tls";
|
||||||
|
|
|
@ -765,9 +765,7 @@ let
|
||||||
|
|
||||||
textutils_p4 = callPackage ../development/ocaml-modules/textutils { };
|
textutils_p4 = callPackage ../development/ocaml-modules/textutils { };
|
||||||
|
|
||||||
tls = callPackage ../development/ocaml-modules/tls {
|
tls = callPackage ../development/ocaml-modules/tls { };
|
||||||
lwt = ocaml_lwt;
|
|
||||||
};
|
|
||||||
|
|
||||||
type_conv_108_08_00 = callPackage ../development/ocaml-modules/type_conv/108.08.00.nix { };
|
type_conv_108_08_00 = callPackage ../development/ocaml-modules/type_conv/108.08.00.nix { };
|
||||||
type_conv_109_60_01 = callPackage ../development/ocaml-modules/type_conv/109.60.01.nix { };
|
type_conv_109_60_01 = callPackage ../development/ocaml-modules/type_conv/109.60.01.nix { };
|
||||||
|
|
Loading…
Reference in a new issue