summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyshark/default.nix
blob: 1bb91953983f2228ac8bd51a724e3499bf5f9e08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib, buildPythonPackage, fetchFromGitHub, py, lxml, pytestCheckHook, wireshark-cli }:

buildPythonPackage rec {
  pname = "pyshark";
  version = "0.4.3";

  src = fetchFromGitHub {
    owner = "KimiNewt";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-cveiFkkSplfQPgUEVWyV40KKHCtKJZsfvdV8JmEUmE4=";
  };

  propagatedBuildInputs = [
    py
    lxml
  ];

  preConfigure = ''
    cd src
  '';

  preCheck = ''
    cd ..
  '';

  checkInputs = [
    pytestCheckHook
    wireshark-cli
  ];

  pythonImportsCheck = [ "pyshark" ];

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