summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/pcap-format
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-29 23:44:18 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-29 23:50:37 +0100
commit9e3040ef413fae384d610c79ff58a85cf1596770 (patch)
tree7cdd262d8d3ab25baf354ae080472524ae71d082 /pkgs/development/ocaml-modules/pcap-format
parentba66c5b87dd4bae9f717f5d23f66fc325d323e8f (diff)
downloadnixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.tar
nixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.tar.gz
nixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.tar.bz2
nixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.tar.lz
nixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.tar.xz
nixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.tar.zst
nixpkgs-9e3040ef413fae384d610c79ff58a85cf1596770.zip
ocamlPackages.pcap-format: init at 0.5.2
Diffstat (limited to 'pkgs/development/ocaml-modules/pcap-format')
-rw-r--r--pkgs/development/ocaml-modules/pcap-format/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/pcap-format/default.nix b/pkgs/development/ocaml-modules/pcap-format/default.nix
new file mode 100644
index 00000000000..f8bb6f4f6b2
--- /dev/null
+++ b/pkgs/development/ocaml-modules/pcap-format/default.nix
@@ -0,0 +1,41 @@
+{ lib, buildDunePackage, fetchurl
+, ppx_cstruct, ppx_tools
+, cstruct, ounit, mmap
+}:
+
+buildDunePackage rec {
+  pname = "pcap-format";
+  version = "0.5.2";
+
+  minimumOCamlVersion = "4.03";
+
+  # due to cstruct
+  useDune2 = true;
+
+  src = fetchurl {
+    url = "https://github.com/mirage/ocaml-pcap/releases/download/${version}/${pname}-${version}.tbz";
+    sha256 = "14c5rpgglyz41jic0fg0xa22d2w1syb86kva22y9fi7aqj9vm31f";
+  };
+
+  nativeBuildInputs = [
+    ppx_tools
+    ppx_cstruct
+  ];
+
+  propagatedBuildInputs = [
+    cstruct
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    ounit
+    mmap
+  ];
+
+  meta = with lib; {
+    description = "Decode and encode PCAP (packet capture) files";
+    homepage = "https://mirage.github.io/ocaml-pcap";
+    license = licenses.isc;
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}