nixpkgs/pkgs/development/python-modules/scapy/find-library.patch
Bjørn Forsman 2fd858d0a2 python3Packages.scapy: build with libpcap
This allows doing packet capture directly from scapy.

Fixes https://github.com/NixOS/nixpkgs/issues/186294.
2022-10-30 20:48:14 +01:00

12 lines
442 B
Diff

diff -uNr a/scapy/libs/winpcapy.py b/scapy/libs/winpcapy.py
--- a/scapy/libs/winpcapy.py 1970-01-01 01:00:01.000000000 +0100
+++ b/scapy/libs/winpcapy.py 2022-08-12 17:57:52.830224862 +0200
@@ -33,7 +33,7 @@
else:
# Try to load libpcap
SOCKET = c_int
- _lib_name = find_library("pcap")
+ _lib_name = "@libpcap_file@"
if not _lib_name:
raise OSError("Cannot find libpcap.so library")
_lib = CDLL(_lib_name)