From 2c616aa63895f064ac1b1332a8cf9e7ae3ddbb44 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 27 Apr 2020 12:59:18 +0200 Subject: [PATCH] ocamlPackages.angstrom*: 0.13.0 -> 0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.email_message: fix 0.12.0 version for angstrom 0.14 ocamlPackages.encore: 0.3 → 0.5 ocamlPackages.git{,-http,-unix}: 2.1.2 → 2.1.3 --- .../ocaml-modules/angstrom/default.nix | 4 +-- .../ocaml-modules/encore/default.nix | 18 ++++++++----- .../ocaml-modules/git-http/default.nix | 10 +++---- .../ocaml-modules/git-unix/default.nix | 12 ++++++--- .../development/ocaml-modules/git/default.nix | 27 ++++++++++++------- .../ocaml-modules/janestreet/default.nix | 1 + .../email-message-angstrom-0.14.patch | 22 +++++++++++++++ pkgs/top-level/ocaml-packages.nix | 8 ++++-- 8 files changed, 73 insertions(+), 29 deletions(-) create mode 100644 pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch diff --git a/pkgs/development/ocaml-modules/angstrom/default.nix b/pkgs/development/ocaml-modules/angstrom/default.nix index b05190ed491..3aecfde8a7d 100644 --- a/pkgs/development/ocaml-modules/angstrom/default.nix +++ b/pkgs/development/ocaml-modules/angstrom/default.nix @@ -2,7 +2,7 @@ buildDunePackage rec { pname = "angstrom"; - version = "0.13.0"; + version = "0.14.1"; minimumOCamlVersion = "4.04"; @@ -10,7 +10,7 @@ buildDunePackage rec { owner = "inhabitedtype"; repo = pname; rev = version; - sha256 = "0vzbwd8j34iv7n6gwqq2mf25q7rqpnpxnifb9ssxhq55p5dd1kp4"; + sha256 = "1l69y0qspgi7kgrphyh7718hjb2sml1a9lljkp65bkqmmmi6ybly"; }; checkInputs = [ alcotest ]; diff --git a/pkgs/development/ocaml-modules/encore/default.nix b/pkgs/development/ocaml-modules/encore/default.nix index ab91117ac08..dd05982c3ca 100644 --- a/pkgs/development/ocaml-modules/encore/default.nix +++ b/pkgs/development/ocaml-modules/encore/default.nix @@ -1,15 +1,21 @@ -{ lib, buildDunePackage, fetchurl, ocaml, alcotest, angstrom, ke }: +{ lib, buildDunePackage, fetchurl, ocaml +, fmt, bigstringaf, bigarray-compat +, bigarray-overlap, angstrom, ke, alcotest }: buildDunePackage rec { pname = "encore"; - version = "0.3"; + version = "0.5"; + src = fetchurl { url = "https://github.com/mirage/encore/releases/download/v${version}/encore-v${version}.tbz"; - sha256 = "05nv6yms5axsmq9cspr7884rz5kirj50izx3vdm89q4yl186qykl"; + sha256 = "15n0dla149k9h7migs76wap08z5402qcvxyqxzl887ha6isj3p9n"; }; - propagatedBuildInputs = [ angstrom ke ]; - checkInputs = lib.optional doCheck alcotest; - doCheck = lib.versions.majorMinor ocaml.version != "4.07"; + + useDune2 = true; + + propagatedBuildInputs = [ angstrom ke fmt bigstringaf bigarray-compat bigarray-overlap ]; + checkInputs = [ alcotest ]; + doCheck = true; meta = { homepage = "https://github.com/mirage/encore"; diff --git a/pkgs/development/ocaml-modules/git-http/default.nix b/pkgs/development/ocaml-modules/git-http/default.nix index 89a1803b520..3b127c65006 100644 --- a/pkgs/development/ocaml-modules/git-http/default.nix +++ b/pkgs/development/ocaml-modules/git-http/default.nix @@ -1,12 +1,12 @@ -{ buildDunePackage, git, cohttp-lwt, alcotest, mtime, nocrypto }: +{ buildDunePackage, git, cohttp, cohttp-lwt }: buildDunePackage { pname = "git-http"; - inherit (git) version src; + inherit (git) version src minimumOCamlVersion; - buildInputs = [ alcotest mtime nocrypto ]; - propagatedBuildInputs = [ git cohttp-lwt ]; - doCheck = true; + useDune2 = true; + + propagatedBuildInputs = [ git cohttp cohttp-lwt ]; meta = { description = "Client implementation of the “Smart” HTTP Git protocol in pure OCaml"; diff --git a/pkgs/development/ocaml-modules/git-unix/default.nix b/pkgs/development/ocaml-modules/git-unix/default.nix index 072d7fdb5cb..0633b8af8f0 100644 --- a/pkgs/development/ocaml-modules/git-unix/default.nix +++ b/pkgs/development/ocaml-modules/git-unix/default.nix @@ -1,13 +1,17 @@ -{ buildDunePackage, git-http, cohttp-lwt-unix, tls, cmdliner, mtime }: +{ stdenv, buildDunePackage, git-http, cohttp, cohttp-lwt-unix +, mmap, cmdliner, mtime, alcotest, mirage-crypto-rng, tls +, io-page, git-binary +}: buildDunePackage { pname = "git-unix"; - inherit (git-http) version src; + inherit (git-http) version src minimumOCamlVersion; useDune2 = true; - buildInputs = [ cmdliner mtime ]; - propagatedBuildInputs = [ cohttp-lwt-unix git-http tls ]; + propagatedBuildInputs = [ mmap cmdliner git-http cohttp cohttp-lwt-unix mtime ]; + checkInputs = [ alcotest mirage-crypto-rng tls io-page git-binary ]; + doCheck = !stdenv.isAarch64; meta = { description = "Unix backend for the Git protocol(s)"; diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix index 741e004979c..d28e8ef2e7b 100644 --- a/pkgs/development/ocaml-modules/git/default.nix +++ b/pkgs/development/ocaml-modules/git/default.nix @@ -1,23 +1,30 @@ -{ lib, fetchurl, buildDunePackage -, alcotest, git, mtime, nocrypto -, angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt +{ stdenv, fetchurl, buildDunePackage +, alcotest, mtime, mirage-crypto-rng, tls, git-binary +, angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt, checkseum , fpath, hex, ke, logs, lru, ocaml_lwt, ocamlgraph, ocplib-endian, uri, rresult +, stdlib-shims }: buildDunePackage rec { - pname = "git"; - version = "2.1.2"; + pname = "git"; + version = "2.1.3"; + + minimumOCamlVersion = "4.07"; + useDune2 = true; src = fetchurl { url = "https://github.com/mirage/ocaml-git/releases/download/${version}/git-${version}.tbz"; - sha256 = "0yyclsh255k7pvc2fcsdi8k2fcrr0by2nz6g3sqnwlimjyp7mz5j"; + sha256 = "1ppllv65vrkfrmx46aiq5879isffcjmg92z9rv2kh92a83h4lqax"; }; - propagatedBuildInputs = [ angstrom astring cstruct decompress digestif encore duff fmt fpath hex ke logs lru ocaml_lwt ocamlgraph ocplib-endian uri rresult ]; - checkInputs = lib.optionals doCheck [ alcotest git mtime nocrypto ]; - doCheck = true; + propagatedBuildInputs = [ + angstrom astring checkseum cstruct decompress digestif encore duff fmt fpath + hex ke logs lru ocaml_lwt ocamlgraph ocplib-endian uri rresult stdlib-shims + ]; + checkInputs = [ alcotest mtime mirage-crypto-rng tls git-binary ]; + doCheck = !stdenv.isAarch64; - meta = { + meta = with stdenv; { description = "Git format and protocol in pure OCaml"; license = lib.licenses.isc; maintainers = [ lib.maintainers.vbgl ]; diff --git a/pkgs/development/ocaml-modules/janestreet/default.nix b/pkgs/development/ocaml-modules/janestreet/default.nix index ff93d65357a..69f4e6f61d8 100644 --- a/pkgs/development/ocaml-modules/janestreet/default.nix +++ b/pkgs/development/ocaml-modules/janestreet/default.nix @@ -533,6 +533,7 @@ rec { pname = "email_message"; hash = "131jd72k4s8cdbgg6gyg7w5v8mphdlvdx4fgvh8d9a1m7kkvbxfg"; propagatedBuildInputs = [ async angstrom core_extended cryptokit magic-mime ounit ]; + patches = [ ./email-message-angstrom-0.14.patch ]; meta.description = "E-mail message parser"; }; diff --git a/pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch b/pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch new file mode 100644 index 00000000000..624a3e5334b --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch @@ -0,0 +1,22 @@ +diff --git a/email_address/src/email_address.ml b/email_address/src/email_address.ml +index 7470273..d070465 100644 +--- a/email_address/src/email_address.ml ++++ b/email_address/src/email_address.ml +@@ -38,7 +38,7 @@ module Stable = struct + let of_string ?default_domain input_str = + let open Core_kernel in + let open! Int.Replace_polymorphic_compare in +- match Angstrom.parse_string Email_address_parser_stable_v1.email_only input_str with ++ match Angstrom.parse_string ~consume:Prefix Email_address_parser_stable_v1.email_only input_str with + | Error error -> + Or_error.error_s [%message + "Failed to parse email address" +@@ -104,7 +104,7 @@ module T = Stable.V1.With_comparator + include T + + let list_of_string ?default_domain input_str = +- match Angstrom.parse_string Email_address_parser_stable_v1.email_list_only input_str with ++ match Angstrom.parse_string ~consume:Prefix Email_address_parser_stable_v1.email_list_only input_str with + | Error error -> + Or_error.error_s [%message + "Failed to parse email address(es)" diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 6708270f1bd..bc7f1532f78 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -350,11 +350,15 @@ let gg = callPackage ../development/ocaml-modules/gg { }; - git = callPackage ../development/ocaml-modules/git { inherit (pkgs) git; }; + git = callPackage ../development/ocaml-modules/git { + git-binary = pkgs.git; + }; git-http = callPackage ../development/ocaml-modules/git-http { }; - git-unix = callPackage ../development/ocaml-modules/git-unix { }; + git-unix = callPackage ../development/ocaml-modules/git-unix { + git-binary = pkgs.git; + }; gmetadom = callPackage ../development/ocaml-modules/gmetadom { };