summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/emile/default.nix
blob: d296e3de967bdd5ffbb40c02f73941568035c4a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib, buildDunePackage, fetchurl, ocaml
, angstrom, ipaddr, base64, pecu, uutf
, alcotest, cmdliner
}:

buildDunePackage rec {
  pname = "emile";
  version = "1.1";

  useDune2 = true;

  src = fetchurl {
    url = "https://github.com/dinosaure/emile/releases/download/v${version}/emile-v${version}.tbz";
    sha256 = "0r1141makr0b900aby1gn0fccjv1qcqgyxib3bzq8fxmjqwjan8p";
  };

  buildInputs = [ cmdliner ];

  propagatedBuildInputs = [
    angstrom
    ipaddr
    base64
    pecu
    uutf
  ];

  # technically emile is available for ocaml >= 4.03, but alcotest
  # and angstrom (fmt) are only available for >= 4.05. Disabling
  # tests for < 4.05 at least improves the error message
  doCheck = lib.versionAtLeast ocaml.version "4.05";
  checkInputs = [ alcotest ];

  meta = with lib; {
    description = "Parser of email address according RFC822";
    license = licenses.mit;
    homepage = "https://github.com/dinosaure/emile";
    maintainers = [ maintainers.sternenseemann ];
  };
}