Skip to content

Commit

Permalink
Nix: add shell and test script
Browse files Browse the repository at this point in the history
  • Loading branch information
picnoir committed Sep 14, 2023
1 parent f98483e commit eaabb78
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions run-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -eu

sudo ls
sudo sockdump --format pcap /nix/var/nix/daemon-socket/socket | wireshark -X lua_script:"${PWD}"/nix-packet.lua -k -i -
13 changes: 13 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs ? import <nixpkgs> {} }:
let
sockdump = pkgs.sockdump.overrideAttrs(old: {
src = pkgs.fetchFromGitHub {
owner = "NinjaTrappeur";
repo = "sockdump";
rev = "5a45e06bc73938334de1375127e82d240b1d7477";
hash = "sha256-q6jdwFhl2G9o2C0BVU6Xz7xizO00yaSQ2KSR/z4fixY=";
};
});
in pkgs.mkShell {
nativeBuildInputs = [ sockdump pkgs.wireshark ];
}

0 comments on commit eaabb78

Please sign in to comment.