From fa3da94dd59efd49d1432a1790b145846761ad2c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:44:46 +0100 Subject: [PATCH] ocamlPackages.arp: init at 2.3.1 --- .../development/ocaml-modules/arp/default.nix | 57 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/ocaml-modules/arp/default.nix diff --git a/pkgs/development/ocaml-modules/arp/default.nix b/pkgs/development/ocaml-modules/arp/default.nix new file mode 100644 index 000000000000..518f1c9f4245 --- /dev/null +++ b/pkgs/development/ocaml-modules/arp/default.nix @@ -0,0 +1,57 @@ +{ lib, buildDunePackage, fetchurl +, cstruct, ipaddr, macaddr, logs, lwt, duration +, mirage-time, mirage-protocols, mirage-profile +, alcotest, ethernet, fmt, mirage-vnetif, mirage-random +, mirage-random-test, mirage-clock-unix, mirage-time-unix +, bisect_ppx +}: + +buildDunePackage rec { + pname = "arp"; + version = "2.3.1"; + + minimumOCamlVersion = "4.06"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "1nzm3fbkvz702g8f60fs49736lpffwchy64i1l1raxm9b4lmdk3p"; + }; + + nativeBuildInputs = [ + bisect_ppx + ]; + + propagatedBuildInputs = [ + cstruct + ipaddr + macaddr + logs + mirage-time + mirage-protocols + lwt + duration + mirage-profile + ]; + + doCheck = true; + checkInputs = [ + alcotest + mirage-profile + mirage-random + mirage-random-test + mirage-vnetif + mirage-clock-unix + mirage-random + mirage-time-unix + ethernet + ]; + + meta = with lib; { + description = "Address Resolution Protocol purely in OCaml"; + license = licenses.isc; + homepage = "https://github.com/mirage/arp"; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index db0187f44f99..e82e425bc48b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -34,6 +34,8 @@ let apron = callPackage ../development/ocaml-modules/apron { }; + arp = callPackage ../development/ocaml-modules/arp { }; + asn1-combinators = callPackage ../development/ocaml-modules/asn1-combinators { }; astring = callPackage ../development/ocaml-modules/astring { };