Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamlPackages.angstrom 0.14.1 and update of all affected packages (encore, git) #91865

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/development/ocaml-modules/angstrom/default.nix
Expand Up @@ -2,15 +2,15 @@

buildDunePackage rec {
pname = "angstrom";
version = "0.13.0";
version = "0.14.1";

minimumOCamlVersion = "4.04";

src = fetchFromGitHub {
owner = "inhabitedtype";
repo = pname;
rev = version;
sha256 = "0vzbwd8j34iv7n6gwqq2mf25q7rqpnpxnifb9ssxhq55p5dd1kp4";
sha256 = "1l69y0qspgi7kgrphyh7718hjb2sml1a9lljkp65bkqmmmi6ybly";
};

checkInputs = [ alcotest ];
Expand Down
28 changes: 28 additions & 0 deletions pkgs/development/ocaml-modules/bigarray-overlap/default.nix
@@ -0,0 +1,28 @@
{ lib, buildDunePackage, fetchurl
, bigarray-compat, alcotest, astring, fpath, bos, findlib, pkg-config
}:

buildDunePackage rec {
pname = "bigarray-overlap";
version = "0.2.0";

src = fetchurl {
url = "https://github.com/dinosaure/overlap/releases/download/v${version}/bigarray-overlap-v${version}.tbz";
sha256 = "1v86avafsbyxjccy0y9gny31s2jzb0kd42v3mhcalklx5f044lcy";
};

minimumOCamlVersion = "4.07";
useDune2 = true;

propagatedBuildInputs = [ bigarray-compat ];

checkInputs = [ alcotest astring fpath bos findlib pkg-config ];
doCheck = true;

meta = with lib; {
homepage = "https://github.com/dinosaure/overlap";
description = "A minimal library to know that 2 bigarray share physically the same memory or not";
license = licenses.mit;
maintainers = [ maintainers.sternenseemann ];
};
}
18 changes: 12 additions & 6 deletions 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";
Expand Down
10 changes: 5 additions & 5 deletions 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";
Expand Down
12 changes: 8 additions & 4 deletions 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)";
Expand Down
27 changes: 17 additions & 10 deletions 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 ];
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/ocaml-modules/janestreet/default.nix
Expand Up @@ -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";
};

Expand Down
@@ -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)"
10 changes: 8 additions & 2 deletions pkgs/top-level/ocaml-packages.nix
Expand Up @@ -52,6 +52,8 @@ let

bigarray-compat = callPackage ../development/ocaml-modules/bigarray-compat { };

bigarray-overlap = callPackage ../development/ocaml-modules/bigarray-overlap { };

bigstringaf = callPackage ../development/ocaml-modules/bigstringaf { };

bigstring = callPackage ../development/ocaml-modules/bigstring { };
Expand Down Expand Up @@ -348,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 { };

Expand Down