summary refs log blame commit diff
path: root/pkgs/development/python-modules/pyshark/default.nix
blob: 1bb91953983f2228ac8bd51a724e3499bf5f9e08 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                                                                       
                    




                         
                                                                   



















                           

                                     






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