2021-02-03 10:19:52 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, py, lxml, pytestCheckHook, wireshark-cli }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyshark";
|
2021-03-16 23:33:42 +00:00
|
|
|
version = "0.4.3";
|
2021-02-03 10:19:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KimiNewt";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-16 23:33:42 +00:00
|
|
|
sha256 = "sha256-cveiFkkSplfQPgUEVWyV40KKHCtKJZsfvdV8JmEUmE4=";
|
2021-02-03 10:19:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
py
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd src
|
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
wireshark-cli
|
|
|
|
];
|
|
|
|
|
2021-03-16 23:33:42 +00:00
|
|
|
pythonImportsCheck = [ "pyshark" ];
|
|
|
|
|
2021-02-03 10:19:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python wrapper for tshark, allowing python packet parsing using wireshark dissectors";
|
|
|
|
homepage = "https://github.com/KimiNewt/pyshark/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ petabyteboy ];
|
|
|
|
};
|
|
|
|
}
|