ocamlPackages.tls: refactoring

This commit is contained in:
superherointj 2021-06-07 13:47:03 -03:00 committed by Vincent Laporte
parent 810b2d52fc
commit c7bcbf5665
2 changed files with 40 additions and 24 deletions

View file

@ -1,28 +1,46 @@
{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct
, cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng
, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime, rresult
, mirage-crypto-ec, hkdf, logs, alcotest }:
{ lib, fetchurl, buildDunePackage
, cstruct, cstruct-sexp, domain-name, fmt, ppx_cstruct, ppx_sexp_conv, logs, hkdf, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng, ocaml_lwt, ptime, rresult, sexplib, x509
, alcotest, cstruct-unix, ounit2
}:
buildDunePackage rec {
minimumOCamlVersion = "4.08";
version = "0.13.1";
pname = "tls";
version = "0.13.1";
src = fetchurl {
url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz";
sha256 = "ca95fa59a82f7d38b0b495fc0cd1ff54e7728492a292895d0067c1ba9de81b7b";
};
minimumOCamlVersion = "4.08";
useDune2 = true;
doCheck = true;
checkInputs = [ cstruct-unix ounit2 alcotest ];
propagatedBuildInputs = [
cstruct
cstruct-sexp
domain-name
fmt
ppx_cstruct
ppx_sexp_conv
logs
hkdf
mirage-crypto
mirage-crypto-ec
mirage-crypto-pk
mirage-crypto-rng
ocaml_lwt
ptime
rresult
sexplib
x509
];
propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp
sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng
x509 domain-name fmt ocaml_lwt ptime mirage-crypto-ec
hkdf logs rresult ];
doCheck = true;
checkInputs = [
alcotest
cstruct-unix
ounit2
];
meta = with lib; {
homepage = "https://github.com/mirleft/ocaml-tls";

View file

@ -1,25 +1,23 @@
{ buildDunePackage, tls
, x509, lwt, fmt, mirage-flow, mirage-kv, mirage-clock, ptime
, mirage-crypto, mirage-crypto-pk, mirage-crypto-ec
, fmt, lwt, mirage-clock, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-flow, mirage-kv, ptime, x509
}:
buildDunePackage {
pname = "tls-mirage";
inherit (tls) version src useDune2 minimumOCamlVersion;
inherit (tls) src version minimumOCamlVersion useDune2;
propagatedBuildInputs = [
tls
x509
lwt
fmt
lwt
mirage-clock
mirage-crypto
mirage-crypto-ec
mirage-crypto-pk
mirage-flow
mirage-kv
mirage-clock
ptime
mirage-crypto
mirage-crypto-pk
mirage-crypto-ec
tls
x509
];
meta = tls.meta // {