2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lxml
|
|
|
|
, packaging
|
|
|
|
, py
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, wireshark-cli
|
|
|
|
}:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyshark";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.4.6";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KimiNewt";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
# 0.4.5 was the last release which was tagged
|
|
|
|
# https://github.com/KimiNewt/pyshark/issues/541
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-yEpUFihETKta3+Xb8eSyTZ1uSi7ao4OqWzsCgDLLhe8=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
py
|
|
|
|
lxml
|
2022-06-16 17:23:12 +00:00
|
|
|
packaging
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
wireshark-cli
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyshark"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"../tests/"
|
|
|
|
];
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Python wrapper for tshark, allowing Python packet parsing using Wireshark dissectors";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/KimiNewt/pyshark/";
|
|
|
|
license = licenses.mit;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
}
|