Unverified Commit 618b6ce6 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

python3Packages.pypcap: drop (#417945)

parents 4ebec481 870c0b72
Loading
Loading
Loading
Loading
+0 −47
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  dpkt,
  fetchFromGitHub,
  libpcap,
  pytestCheckHook,
}:

buildPythonPackage {
  pname = "pypcap";
  version = "1.3.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "pynetwork";
    repo = "pypcap";
    # No release was tagged and PyPI doesn't contain tests.
    rev = "968859f0ffb5b7c990506dffe82457b7de23a026";
    hash = "sha256-NfyEC3qEBm6TjebcDIsoz8tJWaJ625ZFPfx7AMyynWE=";
  };

  postPatch = ''
    # Add the path to libpcap in the nix-store
    substituteInPlace setup.py --replace "('/usr', sys.prefix)" "'${libpcap}'"
    # Remove coverage from test run
    sed -i "/--cov/d" setup.cfg
  '';

  buildInputs = [ libpcap ];

  nativeCheckInputs = [
    dpkt
    pytestCheckHook
  ];

  pytestFlagsArray = [ "tests" ];

  pythonImportsCheck = [ "pcap" ];

  meta = with lib; {
    homepage = "https://github.com/pynetwork/pypcap";
    description = "Simplified object-oriented Python wrapper for libpcap";
    license = licenses.bsd3;
    maintainers = with maintainers; [ oxzi ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -526,6 +526,7 @@ mapAliases ({
  pwndbg = throw "'pwndbg' has been removed due to dependency version incompatibilities that are infeasible to maintain in nixpkgs. Use the downstream flake that pwndbg provides instead: https://github.com/pwndbg/pwndbg"; # Added 2025-02-09
  pxml = throw "pxml was removed, because it was disabled on all python version since 3.8 and last updated in 2020."; # added 2024-05-13
  py3to2 = throw "py3to2 is unmaintained and source is no longer available"; # added 2024-10-23
  pypcap = throw "pypcap has been removed because it is broken and unmaintained upstream."; # added 2025-06-18
  pytricia = throw "pytricia has been removed, since it is unmaintained"; # added 2025-05-25
  py-radix = throw "py-radix has been removed, since it abandoned"; # added 2023-07-07
  py_stringmatching = py-stringmatching; # added 2023-11-12
+0 −4
Original line number Diff line number Diff line
@@ -13316,10 +13316,6 @@ self: super: with self; {
  pypca = callPackage ../development/python-modules/pypca { };
  pypcap = callPackage ../development/python-modules/pypcap {
    inherit (pkgs) libpcap; # Avoid confusion with python package of the same name
  };
  pypck = callPackage ../development/python-modules/pypck { };
  pypdf = callPackage ../development/python-modules/pypdf { };