2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, appdirs
|
2022-06-16 17:23:12 +00:00
|
|
|
, lxml
|
|
|
|
, packaging
|
|
|
|
, py
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, wireshark-cli
|
|
|
|
}:
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyshark";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.5.3";
|
2022-06-16 17:23:12 +00:00
|
|
|
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
|
|
|
rev = "refs/tags/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-byll2GWY2841AAf8Xh+KfaCOtMGVKabTsLCe3gCdZ1o=";
|
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 = [
|
2022-08-12 12:06:08 +00:00
|
|
|
appdirs
|
2021-02-13 14:23:35 +00:00
|
|
|
py
|
|
|
|
lxml
|
2022-06-16 17:23:12 +00:00
|
|
|
packaging
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
2022-08-21 13:32:41 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2022-08-12 12:06:08 +00:00
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|