pkgsStatic.python3Packages.scapy: fix build

libpcap .so loading is relevant for non-static python builds only.
This commit is contained in:
Ihar Hrachyshka
2026-03-21 21:19:04 -04:00
parent 325aa771e3
commit bcc8191730
@@ -34,11 +34,12 @@ buildPythonPackage rec {
hash = "sha256-Pp7pPfaWyzJGf+soENfOPynN8logc5FM848hyVCcdKk=";
};
patches = [ ./find-library.patch ];
patches = lib.optional (!stdenv.hostPlatform.isStatic) ./find-library.patch;
postPatch = ''
printf "${version}" > scapy/VERSION
''
+ lib.optionalString (!stdenv.hostPlatform.isStatic) ''
libpcap_file="${lib.getLib libpcap}/lib/libpcap${stdenv.hostPlatform.extensions.sharedLibrary}"
if ! [ -e "$libpcap_file" ]; then
echo "error: $libpcap_file not found" >&2