nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 55 lines 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, lxml 5, packaging 6, py 7, pytestCheckHook 8, pythonOlder 9, wireshark-cli 10}: 11 12buildPythonPackage rec { 13 pname = "pyshark"; 14 version = "0.4.5"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "KimiNewt"; 21 repo = pname; 22 # 0.4.5 was the last release which was tagged 23 # https://github.com/KimiNewt/pyshark/issues/541 24 rev = "8f8f13aba6ae716aa0a48175255063fe542fdc3b"; 25 hash = "sha256-v9CC9hgTABAiJ0qiFZ/9/zMmHzJXKq3neGtTq/ucnT4="; 26 }; 27 28 sourceRoot = "${src.name}/src"; 29 30 propagatedBuildInputs = [ 31 py 32 lxml 33 packaging 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 wireshark-cli 39 ]; 40 41 pythonImportsCheck = [ 42 "pyshark" 43 ]; 44 45 pytestFlagsArray = [ 46 "../tests/" 47 ]; 48 49 meta = with lib; { 50 description = "Python wrapper for tshark, allowing Python packet parsing using Wireshark dissectors"; 51 homepage = "https://github.com/KimiNewt/pyshark/"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ petabyteboy ]; 54 }; 55}