git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #85142 from sternenseemann/mirage-crypto

ocamlPackages: jackline: switch to mirage-crypto and update dependencies

commit22a3bf9fb9edad917fb6cd1066d58b5e426ee975 authorVincent Laporte <vbgl@users.noreply.github.com> dateTue 21 Apr 2020, 08:56 (7 years ago) parent1a369270814411
6 files changed+52−57
pkgs/applications/networking/instant-messengers/jackline/default.nix+9−8 pkgs/development/ocaml-modules/cstruct/ppx.nix+1−2 pkgs/development/ocaml-modules/otr/default.nix+13−9 pkgs/development/ocaml-modules/tls/default.nix+16−28 pkgs/development/ocaml-modules/x509/default.nix+12−7 pkgs/top-level/ocaml-packages.nix+1−3
pkgs/applications/networking/instant-messengers/jackline/default.nix+9−8
@@ -1,22 +1,23 @@
11{ stdenv, fetchFromGitHub, ocamlPackages }:
22
3−assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.02.2";
3+assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.07";
44
55stdenv.mkDerivation {
66 pname = "jackline";
7− version = "2019-08-08";
7+ version = "unstable-2020-03-22";
88
99 src = fetchFromGitHub {
1010 owner = "hannesm";
1111 repo = "jackline";
12− rev = "b934594010a563ded9c0f436e3fab8f1cae29856";
13− sha256 = "076h03jd970xlii90ax6kvgyq67g81gs30yvdzps366n7zzy3yfc";
12+ rev = "52f84525c74c43e8d03fb1e6ff025ccb2699e4aa";
13+ sha256 = "0wir573ah1w16xzdn9rfwk3569zq4ff5frp0ywq70va4gdlb679c";
1414 };
1515
1616 buildInputs = with ocamlPackages; [
17− ocaml ocamlbuild findlib topkg ppx_sexp_conv
18− erm_xmpp tls nocrypto x509 ocaml_lwt otr astring
19− ptime notty sexplib hex uutf
17+ ocaml ocamlbuild findlib topkg ppx_sexp_conv ppx_deriving
18+ erm_xmpp tls mirage-crypto mirage-crypto-pk x509 domain-name
19+ ocaml_lwt otr astring ptime mtime notty sexplib hex uutf
20+ dns-client base64
2021 ];
2122
2223 buildPhase = "${ocamlPackages.topkg.run} build --pinned true";
@@ -25,7 +26,7 @@ stdenv.mkDerivation {
2526
2627 meta = with stdenv.lib; {
2728 homepage = "https://github.com/hannesm/jackline";
28− description = "Terminal-based XMPP client in OCaml";
29+ description = "minimalistic secure XMPP client in OCaml";
2930 license = licenses.bsd2;
3031 maintainers = with maintainers; [ sternenseemann ];
3132 };
pkgs/development/ocaml-modules/cstruct/ppx.nix+1−2
@@ -10,6 +10,5 @@ buildDunePackage {
1010
1111 minimumOCamlVersion = "4.03";
1212
13− buildInputs = [ sexplib ppx_tools_versioned ];
14− propagatedBuildInputs = [ cstruct ];
13+ propagatedBuildInputs = [ cstruct ppx_tools_versioned sexplib ];
1514}
pkgs/development/ocaml-modules/otr/default.nix+13−9
@@ -1,21 +1,25 @@
1−{ lib, fetchFromGitHub, buildDunePackage
2−, cstruct, sexplib0, rresult, nocrypto, astring
1+{ lib, fetchurl, buildDunePackage
2+, cstruct, sexplib0, rresult, mirage-crypto, mirage-crypto-pk, astring, base64
3+, mirage-crypto-rng
34}:
45
56buildDunePackage rec {
67 pname = "otr";
7− version = "0.3.6";
8+ version = "0.3.8";
89
9− src = fetchFromGitHub {
10− owner = "hannesm";
11− repo = "ocaml-otr";
12− rev = version;
13− sha256 = "0iz6p85a0jxng9aq9blqsky173zaqfr6wlc5j48ad55lgwzlbih5";
10+ src = fetchurl {
11+ url = "https://github.com/hannesm/ocaml-otr/releases/download/v${version}/otr-v${version}.tbz";
12+ sha256 = "18hn9l8wznqnlh2jf1hpnp36f1cx80ncwiiivsbj34llhgp3893d";
1413 };
1514
16− propagatedBuildInputs = [ cstruct sexplib0 rresult nocrypto astring ];
15+ useDune2 = true;
16+
17+ propagatedBuildInputs = [ cstruct sexplib0 mirage-crypto mirage-crypto-pk
18+ astring rresult base64 ];
1719
1820 doCheck = true;
21+ checkInputs = [ mirage-crypto-rng ];
22+
1923 meta = with lib; {
2024 homepage = "https://github.com/hannesm/ocaml-otr";
2125 description = "Off-the-record messaging protocol, purely in OCaml";
pkgs/development/ocaml-modules/tls/default.nix+16−28
@@ -1,38 +1,26 @@
1−{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
2−, ppx_sexp_conv, result, x509, nocrypto, cstruct-sexp, ppx_cstruct, cstruct-unix, ounit
3−, lwt ? null}:
1+{ stdenv, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct
2+, cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng
3+, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime }:
44
5−with stdenv.lib;
5+buildDunePackage rec {
6+ minimumOCamlVersion = "4.07";
67
7−let withLwt = lwt != null; in
8+ version = "0.11.1";
9+ pname = "tls";
810
9−if !versionAtLeast ocaml.version "4.04"
10−then throw "tls is not available for OCaml ${ocaml.version}"
11−else
12−
13−stdenv.mkDerivation rec {
14− version = "0.10.4";
15− name = "ocaml${ocaml.version}-tls-${version}";
16−
17− src = fetchFromGitHub {
18− owner = "mirleft";
19− repo = "ocaml-tls";
20− rev = version;
21− sha256 = "02wv4lia583imn3sfci4nqv6ac5nzig5j3yfdnlqa0q8bp9rfc6g";
11+ src = fetchurl {
12+ url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz";
13+ sha256 = "0ms13fbaxgmpbviazlfa4hb7nmi7s22nklc7ns926b0rr1aq1069";
2214 };
2315
24− nativeBuildInputs = [ ocaml ocamlbuild findlib ];
25− buildInputs = [ findlib topkg ppx_sexp_conv ppx_cstruct ]
26− ++ optionals doCheck [ ounit cstruct-unix ];
27− propagatedBuildInputs = [ cstruct-sexp nocrypto result x509 ] ++
28− optional withLwt lwt;
29−
30− buildPhase = "${topkg.run} build --tests ${boolToString doCheck} --with-mirage false --with-lwt ${boolToString withLwt}";
16+ useDune2 = true;
3117
32− doCheck = versionAtLeast ocaml.version "4.06";
33− checkPhase = "${topkg.run} test";
18+ doCheck = true;
19+ buildInputs = [ cstruct-unix ounit2 ];
3420
35− inherit (topkg) installPhase;
21+ propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp
22+ sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng
23+ x509 domain-name fmt ocaml_lwt ptime ];
3624
3725 meta = with stdenv.lib; {
3826 homepage = "https://github.com/mirleft/ocaml-tls";
pkgs/development/ocaml-modules/x509/default.nix+12−7
@@ -1,21 +1,26 @@
1−{ lib, fetchurl, buildDunePackage, ocaml
1+{ lib, fetchurl, buildDunePackage
22, alcotest, cstruct-unix
3−, asn1-combinators, domain-name, fmt, gmap, nocrypto, rresult
3+, asn1-combinators, domain-name, fmt, gmap, rresult, mirage-crypto, mirage-crypto-pk
4+, logs, base64
45}:
56
67buildDunePackage rec {
8+ minimumOCamlVersion = "4.07";
9+
710 pname = "x509";
8− version = "0.7.1";
11+ version = "0.11.0";
912
1013 src = fetchurl {
1114 url = "https://github.com/mirleft/ocaml-x509/releases/download/v${version}/x509-v${version}.tbz";
12− sha256 = "0hnklgdm1fwwqi0nfvpdbp7ddqvrh9h8697mr99bxqdfhg6sxh1w";
15+ sha256 = "0gcs3vpmixxxx2q4b2iphb1xw1jffya1wkp0p1xbmsfcghzrj20m";
1316 };
1417
15− buildInputs = lib.optionals doCheck [ alcotest cstruct-unix ];
16− propagatedBuildInputs = [ asn1-combinators domain-name fmt gmap nocrypto rresult ];
18+ useDune2 = true;
19+
20+ buildInputs = [ alcotest cstruct-unix ];
21+ propagatedBuildInputs = [ asn1-combinators domain-name fmt gmap mirage-crypto mirage-crypto-pk rresult logs base64 ];
1722
18− doCheck = lib.versionAtLeast ocaml.version "4.06";
23+ doCheck = true;
1924
2025 meta = with lib; {
2126 homepage = "https://github.com/mirleft/ocaml-x509";
pkgs/top-level/ocaml-packages.nix+1−3
@@ -767,9 +767,7 @@ let
767767
768768 textutils_p4 = callPackage ../development/ocaml-modules/textutils { };
769769
770− tls = callPackage ../development/ocaml-modules/tls {
771− lwt = ocaml_lwt;
772− };
770+ tls = callPackage ../development/ocaml-modules/tls { };
773771
774772 type_conv_108_08_00 = callPackage ../development/ocaml-modules/type_conv/108.08.00.nix { };
775773 type_conv_109_60_01 = callPackage ../development/ocaml-modules/type_conv/109.60.01.nix { };