From ba66c5b87dd4bae9f717f5d23f66fc325d323e8f Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:43:49 +0100 Subject: [PATCH] ocamlPackages.mirage-vnetif: init at 0.5.0 --- .../ocaml-modules/mirage-vnetif/default.nix | 40 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-vnetif/default.nix diff --git a/pkgs/development/ocaml-modules/mirage-vnetif/default.nix b/pkgs/development/ocaml-modules/mirage-vnetif/default.nix new file mode 100644 index 000000000000..cafb50309ce6 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-vnetif/default.nix @@ -0,0 +1,40 @@ +{ lib, buildDunePackage, fetchurl +, lwt, mirage-time, mirage-clock, mirage-net +, cstruct, ipaddr, macaddr, mirage-profile +, duration, logs +}: + +buildDunePackage rec { + pname = "mirage-vnetif"; + version = "0.5.0"; + + minimumOCamlVersion = "4.06"; + + # due to cstruct + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0cpqwf51v2cpz41dfqxabf3bsabwyl6a0h0v2ncrn33q58i60m5q"; + }; + + propagatedBuildInputs = [ + lwt + mirage-net + mirage-time + mirage-clock + cstruct + ipaddr + macaddr + mirage-profile + duration + logs + ]; + + meta = with lib; { + description = "Virtual network interface and software switch for Mirage"; + homepage = "https://github.com/mirage/${pname}"; + license = licenses.isc; + mantainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 001749123e2c..52afcd002b3e 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -611,6 +611,8 @@ let mirage-unix = callPackage ../development/ocaml-modules/mirage-unix { }; + mirage-vnetif = callPackage ../development/ocaml-modules/mirage-vnetif { }; + mlgmp = callPackage ../development/ocaml-modules/mlgmp { }; mlgmpidl = callPackage ../development/ocaml-modules/mlgmpidl { };