Nix: add shell and test script

This commit is contained in:
Félix Baylac Jacqué 2023-09-14 14:05:16 +02:00
parent f98483e7ba
commit eaabb78be3
2 changed files with 19 additions and 0 deletions

6
run-test Executable file
View File

@ -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
shell.nix Normal file
View File

@ -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 ];
}