Merge pull request #47141 from vbgl/jackline-20180511

jackline: 2017-12-24 -> 2018-05-11
This commit is contained in:
xeji 2018-09-23 23:29:10 +02:00 committed by GitHub
commit ccd2862130
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 97 deletions

View file

@ -3,21 +3,19 @@
assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.02.2";
stdenv.mkDerivation rec {
version = "2017-12-24";
version = "2018-05-11";
name = "jackline-${version}";
src = fetchFromGitHub {
owner = "hannesm";
repo = "jackline";
rev = "8678e8a1a06e641218a31ae25150040202f89289";
sha256 = "05z9kvd7gwr59ic7hnmbayhwyyqd41xxz01cvdlcgplk3z7zlwg5";
rev = "bc36b1c8b80fee6baba4f91011cd01b82a06e8eb";
sha256 = "1xx2yx8a95m84sa1bkxi3rlx7pd39zkqwk3znj0zzz3cni6apfrz";
};
patches = [ ./tls-0.9.0.patch ];
buildInputs = with ocamlPackages; [
ocaml ocamlbuild findlib topkg ppx_sexp_conv
erm_xmpp_0_3 tls nocrypto x509 ocaml_lwt otr astring
erm_xmpp tls nocrypto x509 ocaml_lwt otr astring
ptime notty sexplib hex uutf
];

View file

@ -1,29 +0,0 @@
diff --git a/cli/cli_config.ml b/cli/cli_config.ml
index 991ee77..59a0edb 100644
--- a/cli/cli_config.ml
+++ b/cli/cli_config.ml
@@ -207,7 +207,9 @@ let configure term () =
ask above "CA file: " (fun x -> x) (fun x -> if Sys.file_exists x then `Ok x else `Invalid) term >>= fun trust_anchor ->
Lwt_unix.access trust_anchor [ Unix.F_OK ; Unix.R_OK ] >>= fun () ->
X509_lwt.certs_of_pem trust_anchor >>= fun tas ->
- (match X509.Validation.valid_cas ~time:(Unix.time ()) tas with
+ let time = match Ptime.of_float_s (Unix.time ())
+ with Some time -> time | None -> assert false in
+ (match X509.Validation.valid_cas ~time tas with
| [] -> Lwt.fail (Invalid_argument "trust anchor file is empty!")
| _ -> Lwt.return (`Trust_anchor trust_anchor))
| Some fp -> Lwt.return (`Fingerprint fp) ) >>= fun authenticator ->
diff --git a/cli/cli_state.ml b/cli/cli_state.ml
index d5db502..91540c9 100644
--- a/cli/cli_state.ml
+++ b/cli/cli_state.ml
@@ -262,7 +262,8 @@ module Connect = struct
(match config.Xconfig.authenticator with
| `Trust_anchor x -> X509_lwt.authenticator (`Ca_file x)
| `Fingerprint fp ->
- let time = Unix.gettimeofday () in
+ let time = match Ptime.of_float_s (Unix.gettimeofday ())
+ with Some time -> time | None -> assert false in
let fp =
Nocrypto.Uncommon.Cs.of_hex
(String.map (function ':' -> ' ' | x -> x) fp)

View file

@ -1,17 +1,17 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
if stdenv.lib.versionAtLeast ocaml.version "4.06"
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "erm_xml is not available for OCaml ${ocaml.version}"
else
let version = "0.3"; in
let version = "0.3+20180112"; in
stdenv.mkDerivation {
name = "ocaml-erm_xml-${version}";
name = "ocaml${ocaml.version}-erm_xml-${version}";
src = fetchzip {
url = "https://github.com/ermine/xml/archive/v${version}.tar.gz";
sha256 = "19znk5w0qiw3wij4n6w3h5bcr221yy57jf815fr8k9m8kin710g3";
url = "https://github.com/hannesm/xml/archive/bbabdade807d8281fc48806da054b70dfe482479.tar.gz";
sha256 = "1gawpmg8plip0wia0xq60m024dn7l3ykwbjpbqx9f9bdmx74n1rr";
};
buildInputs = [ ocaml findlib ocamlbuild ];
@ -19,7 +19,7 @@ stdenv.mkDerivation {
createFindlibDestdir = true;
meta = {
homepage = https://github.com/ermine/xml;
homepage = https://github.com/hannesm/xml;
description = "XML Parser for discrete data";
platforms = ocaml.meta.platforms or [];
license = stdenv.lib.licenses.bsd3;

View file

@ -1,29 +0,0 @@
{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, erm_xml, nocrypto }:
buildOcaml rec {
version = "0.3";
name = "erm_xmpp";
src = fetchFromGitHub {
owner = "hannesm";
repo = "xmpp";
rev = "eee18bd3dd343550169969c0b45548eafd51cfe1";
sha256 = "0hzs528lrx1ayalv6fh555pjn0b4l8xch1f72hd3b07g1xahdas5";
};
buildInputs = [ ocaml findlib ];
propagatedBuildInputs = [ erm_xml nocrypto ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
buildPhase = "ocaml setup.ml -build";
installPhase = "ocaml setup.ml -install";
createFindlibDestdir = true;
meta = {
homepage = https://github.com/hannesm/xmpp;
description = "OCaml based XMPP implementation (fork)";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
};
}

View file

@ -1,33 +1,32 @@
{ stdenv, fetchurl, fetchzip, ocaml, findlib, ocamlbuild, erm_xml, cryptokit, camlp4 }:
{ stdenv, fetchFromGitHub, ocaml, findlib, camlp4, ocamlbuild
, erm_xml, nocrypto
}:
let
version = "0.2";
disable-tests = fetchurl {
url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/erm_xmpp/erm_xmpp.0.2/files/disable_tests.patch;
sha256 = "09d8630nmx2x8kb8ap1zmsb93zs14cqg7ga1gmdl92jvsjxbhgc1";
stdenv.mkDerivation rec {
version = "0.3+20180112";
name = "ocaml${ocaml.version}-erm_xmpp-${version}";
src = fetchFromGitHub {
owner = "hannesm";
repo = "xmpp";
rev = "184dc70fab7d46d09b9148ca4448f07f1e0a2df2";
sha256 = "1dsqsfacvd9xqsqjzh6xwbnf2mv1dvhy210riyvjd260q085ch6n";
};
in
stdenv.mkDerivation {
name = "ocaml-erm_xmpp-${version}";
src = fetchzip {
url = "https://github.com/ermine/xmpp/archive/v${version}.tar.gz";
sha256 = "0saw2dmrzv2aadrznvyvchnhivvcwm78x9nwf6flq5v0pqddapk2";
};
patches = [ disable-tests ];
buildInputs = [ ocaml findlib ocamlbuild camlp4 ];
propagatedBuildInputs = [ erm_xml cryptokit ];
propagatedBuildInputs = [ erm_xml nocrypto ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
buildPhase = "ocaml setup.ml -build";
installPhase = "ocaml setup.ml -install";
createFindlibDestdir = true;
meta = {
homepage = https://github.com/ermine/xmpp;
description = "OCaml based XMPP implementation";
platforms = ocaml.meta.platforms or [];
homepage = https://github.com/hannesm/xmpp;
description = "OCaml based XMPP implementation (fork)";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
inherit (ocaml.meta) platforms;
};
}

View file

@ -16966,9 +16966,7 @@ with pkgs;
extra-packages = [ csound ];
};
jackline = callPackage ../applications/networking/instant-messengers/jackline {
ocamlPackages = ocaml-ng.ocamlPackages_4_05;
};
jackline = callPackage ../applications/networking/instant-messengers/jackline { };
slack = callPackage ../applications/networking/instant-messengers/slack { };

View file

@ -240,8 +240,6 @@ let
erm_xmpp = callPackage ../development/ocaml-modules/erm_xmpp { };
erm_xmpp_0_3 = callPackage ../development/ocaml-modules/erm_xmpp/0.3.nix { };
estring = callPackage ../development/ocaml-modules/estring { };
ezjsonm = callPackage ../development/ocaml-modules/ezjsonm { };