From 501faf79fac647947bcbca6d9b0ae55c232c70d8 Mon Sep 17 00:00:00 2001 From: Willow Date: Fri, 15 Dec 2023 16:19:30 -0600 Subject: [PATCH 1/2] maintainers: add willow_ch --- maintainers/maintainer-list.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d20aa7db61ad..fb9bcf8f0a3b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19719,6 +19719,15 @@ githubId = 20464732; name = "Willi Butz"; }; + willow_ch = { + email = "nix@w.wolo.dev"; + github = "spaghetus"; + githubId = 28763739; + name = "Willow Carlson-Huber"; + keys = [{ + fingerprint = "FE21E0981CDFD50ADD086423C21A693BA4693A60"; + }]; + }; willswats = { email = "williamstuwatson@gmail.com"; github = "willswats"; From 640ef7805e2a18bac4dce853860659a8120518c3 Mon Sep 17 00:00:00 2001 From: Willow Date: Fri, 15 Dec 2023 16:19:42 -0600 Subject: [PATCH 2/2] caper: init at 0.9 caper: apply recommended changes Co-authored-by: Yohann Boniface caper: apply recommended changes caper: apply nixfmt caper: apply nixfmt rfc style --- maintainers/maintainer-list.nix | 4 +- pkgs/by-name/ca/caper/package.nix | 64 +++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 pkgs/by-name/ca/caper/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fb9bcf8f0a3b..a3db4fff93a5 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19724,9 +19724,7 @@ github = "spaghetus"; githubId = 28763739; name = "Willow Carlson-Huber"; - keys = [{ - fingerprint = "FE21E0981CDFD50ADD086423C21A693BA4693A60"; - }]; + keys = [ { fingerprint = "FE21E0981CDFD50ADD086423C21A693BA4693A60"; } ]; }; willswats = { email = "williamstuwatson@gmail.com"; diff --git a/pkgs/by-name/ca/caper/package.nix b/pkgs/by-name/ca/caper/package.nix new file mode 100644 index 000000000000..f7dc73b829de --- /dev/null +++ b/pkgs/by-name/ca/caper/package.nix @@ -0,0 +1,64 @@ +{ + stdenv, + lib, + ocaml, + ocamlPackages, + gnum4, + fetchFromGitLab, +}: +stdenv.mkDerivation rec { + pname = "caper"; + version = "0.9"; + + src = fetchFromGitLab { + owner = "niksu"; + repo = "caper"; + rev = "v${version}"; + hash = "sha256-TSryjz0NrGdkc+6vmfBqsuVpV3N9FvteTFsVqpUcm0w="; + }; + + nativeBuildInputs = [ + ocaml + ocamlPackages.ocamlbuild + ocamlPackages.findlib + ocamlPackages.menhir + gnum4 + ]; + + buildInputs = [ + ocamlPackages.angstrom + ]; + + strictDeps = true; + + buildPhase = '' + runHook preBuild + CAPER_WITH_ENGLISH=yes bash build.sh caper.native + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp caper.native $out/bin/caper + runHook postInstall + ''; + + meta = { + description = "Tool for understanding and processing pcap (packet capture) expressions"; + longDescription = '' + Caper is a tool for understanding and processing "pcap expressions" (also known as *tcpdump filters*) which are used for network packet analysis. + Caper can be used for: + * Expanding out pcap expressions "in full" to understand their implicit features. + * Reasoning about whether two expressions accept the same set of packets, or how their accepted packets differ. + * Converting pcap expressions into BPF programs. + * Converting between pcap expressions and English. + + More info can be found in the Caper paper (https://www.nik.network/caper/pcap_semantics.pdf). + ''; + homepage = "https://gitlab.com/niksu/caper"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ willow_ch ]; + mainProgram = "caper"; + }; +}