Skip to content

tcpreplay: Fix build after splitting libpcap to multiple outputs#442048

Merged
philiptaron merged 1 commit intoNixOS:masterfrom
wentasah:fix-tcpreplay
Sep 11, 2025
Merged

tcpreplay: Fix build after splitting libpcap to multiple outputs#442048
philiptaron merged 1 commit intoNixOS:masterfrom
wentasah:fix-tcpreplay

Conversation

@wentasah
Copy link
Contributor

This fixes recent build failure.

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

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Sep 11, 2025
@nix-owners nix-owners bot requested a review from proteansec September 11, 2025 14:26
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]: NixOS@da89a2d
@philiptaron
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 442048
Commit: d0a565c182d42f0eecb1b88f83b2a5516ed88989


x86_64-linux

✅ 1 package built:
  • tcpreplay

Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved automatically following the successful run of nixpkgs-review.

Comment on lines +20 to +25
# 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'
'';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works, my preferred fix would be to patch out this monstrosity with something correct for building with Nix, where we understand exaction where libpcap is and where its headers are.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 11, 2025
@philiptaron philiptaron added this pull request to the merge queue Sep 11, 2025
Merged via the queue into NixOS:master with commit b9428fe Sep 11, 2025
30 of 32 checks passed
@wentasah wentasah deleted the fix-tcpreplay branch September 11, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants