diff options
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/tls')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/tls/default.nix | 33 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix | 29 |
2 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix new file mode 100644 index 000000000000..2ee01ed82194 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix @@ -0,0 +1,33 @@ +{ 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 +, hacl_x25519, fiat-p256, hkdf, logs, alcotest }: + +buildDunePackage rec { + minimumOCamlVersion = "4.08"; + + version = "0.12.8"; + pname = "tls"; + + src = fetchurl { + url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz"; + sha256 = "0sgppvfnamfnsglw1cl801i1xqkxbs33g40kwmmqj2vqjcarm26a"; + }; + + useDune2 = true; + + doCheck = true; + checkInputs = [ cstruct-unix ounit2 alcotest ]; + + 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 hacl_x25519 fiat-p256 + hkdf logs ]; + + meta = with lib; { + homepage = "https://github.com/mirleft/ocaml-tls"; + description = "TLS in pure OCaml"; + license = licenses.bsd2; + maintainers = with maintainers; [ sternenseemann ]; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix new file mode 100644 index 000000000000..ad81c03c35d0 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix @@ -0,0 +1,29 @@ +{ buildDunePackage, tls +, x509, lwt, fmt, mirage-flow, mirage-kv, mirage-clock, ptime +, mirage-crypto, mirage-crypto-pk, hacl_x25519, fiat-p256 +}: + +buildDunePackage { + pname = "tls-mirage"; + + inherit (tls) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + tls + x509 + lwt + fmt + mirage-flow + mirage-kv + mirage-clock + ptime + mirage-crypto + mirage-crypto-pk + hacl_x25519 + fiat-p256 + ]; + + meta = tls.meta // { + description = "Transport Layer Security purely in OCaml, MirageOS layer"; + }; +} |