Merge pull request #85142 from sternenseemann/mirage-crypto

ocamlPackages: jackline: switch to mirage-crypto and update dependencies
This commit is contained in:
Vincent Laporte
2020-04-21 08:56:52 +02:00
committed by GitHub
6 changed files with 52 additions and 57 deletions

View File

@@ -10,6 +10,5 @@ buildDunePackage {
minimumOCamlVersion = "4.03";
buildInputs = [ sexplib ppx_tools_versioned ];
propagatedBuildInputs = [ cstruct ];
propagatedBuildInputs = [ cstruct ppx_tools_versioned sexplib ];
}

View File

@@ -1,21 +1,25 @@
{ lib, fetchFromGitHub, buildDunePackage
, cstruct, sexplib0, rresult, nocrypto, astring
{ lib, fetchurl, buildDunePackage
, cstruct, sexplib0, rresult, mirage-crypto, mirage-crypto-pk, astring, base64
, mirage-crypto-rng
}:
buildDunePackage rec {
pname = "otr";
version = "0.3.6";
version = "0.3.8";
src = fetchFromGitHub {
owner = "hannesm";
repo = "ocaml-otr";
rev = version;
sha256 = "0iz6p85a0jxng9aq9blqsky173zaqfr6wlc5j48ad55lgwzlbih5";
src = fetchurl {
url = "https://github.com/hannesm/ocaml-otr/releases/download/v${version}/otr-v${version}.tbz";
sha256 = "18hn9l8wznqnlh2jf1hpnp36f1cx80ncwiiivsbj34llhgp3893d";
};
propagatedBuildInputs = [ cstruct sexplib0 rresult nocrypto astring ];
useDune2 = true;
propagatedBuildInputs = [ cstruct sexplib0 mirage-crypto mirage-crypto-pk
astring rresult base64 ];
doCheck = true;
checkInputs = [ mirage-crypto-rng ];
meta = with lib; {
homepage = "https://github.com/hannesm/ocaml-otr";
description = "Off-the-record messaging protocol, purely in OCaml";

View File

@@ -1,38 +1,26 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
, ppx_sexp_conv, result, x509, nocrypto, cstruct-sexp, ppx_cstruct, cstruct-unix, ounit
, lwt ? null}:
{ stdenv, 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 }:
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"
then throw "tls is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "0.10.4";
name = "ocaml${ocaml.version}-tls-${version}";
src = fetchFromGitHub {
owner = "mirleft";
repo = "ocaml-tls";
rev = version;
sha256 = "02wv4lia583imn3sfci4nqv6ac5nzig5j3yfdnlqa0q8bp9rfc6g";
src = fetchurl {
url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz";
sha256 = "0ms13fbaxgmpbviazlfa4hb7nmi7s22nklc7ns926b0rr1aq1069";
};
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
buildInputs = [ findlib topkg ppx_sexp_conv ppx_cstruct ]
++ optionals doCheck [ ounit cstruct-unix ];
propagatedBuildInputs = [ cstruct-sexp nocrypto result x509 ] ++
optional withLwt lwt;
useDune2 = true;
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";
checkPhase = "${topkg.run} test";
inherit (topkg) installPhase;
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 ];
meta = with stdenv.lib; {
homepage = "https://github.com/mirleft/ocaml-tls";

View File

@@ -1,21 +1,26 @@
{ lib, fetchurl, buildDunePackage, ocaml
{ lib, fetchurl, buildDunePackage
, alcotest, cstruct-unix
, asn1-combinators, domain-name, fmt, gmap, nocrypto, rresult
, asn1-combinators, domain-name, fmt, gmap, rresult, mirage-crypto, mirage-crypto-pk
, logs, base64
}:
buildDunePackage rec {
minimumOCamlVersion = "4.07";
pname = "x509";
version = "0.7.1";
version = "0.11.0";
src = fetchurl {
url = "https://github.com/mirleft/ocaml-x509/releases/download/v${version}/x509-v${version}.tbz";
sha256 = "0hnklgdm1fwwqi0nfvpdbp7ddqvrh9h8697mr99bxqdfhg6sxh1w";
sha256 = "0gcs3vpmixxxx2q4b2iphb1xw1jffya1wkp0p1xbmsfcghzrj20m";
};
buildInputs = lib.optionals doCheck [ alcotest cstruct-unix ];
propagatedBuildInputs = [ asn1-combinators domain-name fmt gmap nocrypto rresult ];
useDune2 = true;
doCheck = lib.versionAtLeast ocaml.version "4.06";
buildInputs = [ alcotest cstruct-unix ];
propagatedBuildInputs = [ asn1-combinators domain-name fmt gmap mirage-crypto mirage-crypto-pk rresult logs base64 ];
doCheck = true;
meta = with lib; {
homepage = "https://github.com/mirleft/ocaml-x509";