From ab2f86aec3c5d9bc97041a47b76bfe757a33e19a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 21 Sep 2018 17:02:48 +0000 Subject: [PATCH 1/3] ocamlPackages.erm_xml: 0.3 -> 0.3+20180112 --- pkgs/development/ocaml-modules/erm_xml/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/ocaml-modules/erm_xml/default.nix b/pkgs/development/ocaml-modules/erm_xml/default.nix index c944752ff6b6..35b5c73b578b 100644 --- a/pkgs/development/ocaml-modules/erm_xml/default.nix +++ b/pkgs/development/ocaml-modules/erm_xml/default.nix @@ -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; From 26aa4c36baa119cb108b9949190eb170a16c9ff6 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 21 Sep 2018 17:01:52 +0000 Subject: [PATCH 2/3] ocamlPackages.erm_xmpp: 0.3 -> 0.3+20180112 --- .../instant-messengers/jackline/default.nix | 2 +- .../ocaml-modules/erm_xmpp/0.3.nix | 29 ------------- .../ocaml-modules/erm_xmpp/default.nix | 43 +++++++++---------- pkgs/top-level/ocaml-packages.nix | 2 - 4 files changed, 22 insertions(+), 54 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/erm_xmpp/0.3.nix diff --git a/pkgs/applications/networking/instant-messengers/jackline/default.nix b/pkgs/applications/networking/instant-messengers/jackline/default.nix index 9f85c940c1bc..e8cbd27de614 100644 --- a/pkgs/applications/networking/instant-messengers/jackline/default.nix +++ b/pkgs/applications/networking/instant-messengers/jackline/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { 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 ]; diff --git a/pkgs/development/ocaml-modules/erm_xmpp/0.3.nix b/pkgs/development/ocaml-modules/erm_xmpp/0.3.nix deleted file mode 100644 index 1a8f854185a2..000000000000 --- a/pkgs/development/ocaml-modules/erm_xmpp/0.3.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/pkgs/development/ocaml-modules/erm_xmpp/default.nix b/pkgs/development/ocaml-modules/erm_xmpp/default.nix index c6027ce11ce5..a6bb75e61c24 100644 --- a/pkgs/development/ocaml-modules/erm_xmpp/default.nix +++ b/pkgs/development/ocaml-modules/erm_xmpp/default.nix @@ -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; }; } diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index f5e5cfb3972b..6039ef7dcf14 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -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 { }; From dbd57837913b6322a314c52a071a8b343318b543 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 24 Jun 2018 08:27:33 +0000 Subject: [PATCH 3/3] jackline: 2017-12-24 -> 2018-05-11 --- .../instant-messengers/jackline/default.nix | 8 ++--- .../jackline/tls-0.9.0.patch | 29 ------------------- pkgs/top-level/all-packages.nix | 4 +-- 3 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 pkgs/applications/networking/instant-messengers/jackline/tls-0.9.0.patch diff --git a/pkgs/applications/networking/instant-messengers/jackline/default.nix b/pkgs/applications/networking/instant-messengers/jackline/default.nix index e8cbd27de614..689445d7dcb8 100644 --- a/pkgs/applications/networking/instant-messengers/jackline/default.nix +++ b/pkgs/applications/networking/instant-messengers/jackline/default.nix @@ -3,18 +3,16 @@ 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 tls nocrypto x509 ocaml_lwt otr astring diff --git a/pkgs/applications/networking/instant-messengers/jackline/tls-0.9.0.patch b/pkgs/applications/networking/instant-messengers/jackline/tls-0.9.0.patch deleted file mode 100644 index 38f38a03a802..000000000000 --- a/pkgs/applications/networking/instant-messengers/jackline/tls-0.9.0.patch +++ /dev/null @@ -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) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6448a0b4bd6..6aa6f2df1923 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16954,9 +16954,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 { };