diff options
author | Vincent Laporte <vbgl@users.noreply.github.com> | 2020-04-21 08:56:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 08:56:52 +0200 |
commit | 22a3bf9fb9edad917fb6cd1066d58b5e426ee975 (patch) | |
tree | abe73504e9831e55bde4df79c3685e9e95c03fdf /pkgs/development/ocaml-modules | |
parent | 1a36927174685b6c9d27691e45ae6af90a2f649f (diff) | |
parent | 081441122a351ce7b9a33b9a9908d9e9ba3d020c (diff) | |
download | nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.tar nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.tar.gz nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.tar.bz2 nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.tar.lz nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.tar.xz nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.tar.zst nixlib-22a3bf9fb9edad917fb6cd1066d58b5e426ee975.zip |
Merge pull request #85142 from sternenseemann/mirage-crypto
ocamlPackages: jackline: switch to mirage-crypto and update dependencies
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/ppx.nix | 3 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/otr/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/tls/default.nix | 44 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/x509/default.nix | 19 |
4 files changed, 42 insertions, 46 deletions
diff --git a/pkgs/development/ocaml-modules/cstruct/ppx.nix b/pkgs/development/ocaml-modules/cstruct/ppx.nix index b5c39533e733..22fe4ac47cf3 100644 --- a/pkgs/development/ocaml-modules/cstruct/ppx.nix +++ b/pkgs/development/ocaml-modules/cstruct/ppx.nix @@ -10,6 +10,5 @@ buildDunePackage { minimumOCamlVersion = "4.03"; - buildInputs = [ sexplib ppx_tools_versioned ]; - propagatedBuildInputs = [ cstruct ]; + propagatedBuildInputs = [ cstruct ppx_tools_versioned sexplib ]; } diff --git a/pkgs/development/ocaml-modules/otr/default.nix b/pkgs/development/ocaml-modules/otr/default.nix index 866360856d8f..cec5d2ee0d07 100644 --- a/pkgs/development/ocaml-modules/otr/default.nix +++ b/pkgs/development/ocaml-modules/otr/default.nix @@ -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"; diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix index 9343ae5b1ecf..e425e2a3b7e4 100644 --- a/pkgs/development/ocaml-modules/tls/default.nix +++ b/pkgs/development/ocaml-modules/tls/default.nix @@ -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; - - buildPhase = "${topkg.run} build --tests ${boolToString doCheck} --with-mirage false --with-lwt ${boolToString withLwt}"; + useDune2 = true; - doCheck = versionAtLeast ocaml.version "4.06"; - checkPhase = "${topkg.run} test"; + doCheck = true; + buildInputs = [ cstruct-unix ounit2 ]; - 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"; diff --git a/pkgs/development/ocaml-modules/x509/default.nix b/pkgs/development/ocaml-modules/x509/default.nix index 22006d0693a5..d30b23aa3ee3 100644 --- a/pkgs/development/ocaml-modules/x509/default.nix +++ b/pkgs/development/ocaml-modules/x509/default.nix @@ -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; + + buildInputs = [ alcotest cstruct-unix ]; + propagatedBuildInputs = [ asn1-combinators domain-name fmt gmap mirage-crypto mirage-crypto-pk rresult logs base64 ]; - doCheck = lib.versionAtLeast ocaml.version "4.06"; + doCheck = true; meta = with lib; { homepage = "https://github.com/mirleft/ocaml-x509"; |