about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyshark/default.nix
blob: 206e3671f47fcadc0c2037a6cabb010823541c77 (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
{ lib, buildPythonPackage, fetchFromGitHub, py, lxml, pytestCheckHook, wireshark-cli }:

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

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

  propagatedBuildInputs = [
    py
    lxml
  ];

  preConfigure = ''
    cd src
  '';

  preCheck = ''
    cd ..
  '';

  checkInputs = [
    pytestCheckHook
    wireshark-cli
  ];

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