tcpreplay: Fix build after splitting libpcap to multiple outputs

Configure file of tcpreplay expects that libpcap header files and
libraries share the same prefix. Since [1] this is no longer true so
we have to patch the configure script.

[1]: https://github.com/NixOS/nixpkgs/pull/429972/commits/da89a2d075f2279a09585c1b217b8f7382817339
This commit is contained in:
Michal Sojka
2025-09-11 19:54:56 +02:00
parent ab0f3607a6
commit d0a565c182
+7
View File
@@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
buildInputs = [ libpcap ];
# Allow having different prefix for header files (default output
# "out") and libraries ("lib" output)
postPatch = ''
substituteInPlace configure \
--replace-fail 'ls ''${testdir}/$dir/libpcap' 'ls ${lib.getLib libpcap}/$dir/libpcap'
'';
configureFlags = [
"--disable-local-libopts"
"--disable-libopts-install"