10 buildPythonPackage rec {
15 src = fetchFromGitHub {
19 sha256 = "1zscfk10jpqwxgc8d84y8bffiwr92qrg2b24afhjwiyr352l67cf";
23 # Support for Python 3.9, https://github.com/pynetwork/pypcap/pull/102
25 name = "support-python-3.9.patch";
26 url = "https://github.com/pynetwork/pypcap/pull/102/commits/e22f5d25f0d581d19ef337493434e72cd3a6ae71.patch";
27 sha256 = "0n1syh1vcplgsf6njincpqphd2w030s3b2jyg86d7kbqv1w5wk0l";
32 # Add the path to libpcap in the nix-store
33 substituteInPlace setup.py --replace "('/usr', sys.prefix)" "'${libpcap}'"
34 # Remove coverage from test run
35 sed -i "/--cov/d" setup.cfg
38 buildInputs = [ libpcap ];
45 pytestFlagsArray = [ "tests" ];
47 pythonImportsCheck = [ "pcap" ];
50 homepage = "https://github.com/pynetwork/pypcap";
51 description = "Simplified object-oriented Python wrapper for libpcap";
52 license = licenses.bsd3;
53 maintainers = with maintainers; [ oxzi ];