Skip to content

Commit

Permalink
packetdrill: 1.0 -> unstable-2020-08-22, fix build
Browse files Browse the repository at this point in the history
also switch to cmake build

(cherry picked from commit 87fad4d)
  • Loading branch information
risicle authored and jonringer committed Oct 11, 2020
1 parent 8d4a4dd commit c4ea77f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 32 deletions.
28 changes: 20 additions & 8 deletions pkgs/tools/networking/packetdrill/default.nix
@@ -1,24 +1,36 @@
{ stdenv, fetchFromGitHub, bison, flex }:
stdenv.mkDerivation {
version = "1.0";
{ stdenv, fetchFromGitHub, bison, flex, cmake, libpcap }:
stdenv.mkDerivation rec {
pname = "packetdrill";
version = "unstable-2020-08-22";

src = fetchFromGitHub {
owner = "google";
repo = "packetdrill";
rev = "58a7865c47e3a71e92ca0e4cc478c320e1c35f82";
sha256 = "09sqiakmn63idfjhy2ddf1456sfhi8yhsbp8lxvc1yfjikjxwwbc";
rev = "68a34fa73cf221e5f52d6fa4f203bcd93062be1b";
sha256 = "0djkwb6l2959f44d98vwb092rghf0qmii8391vrpxqb99j6pv4h6";
};
setSourceRoot = ''
export sourceRoot=$(realpath */gtests/net/packetdrill)
'';

NIX_CFLAGS_COMPILE = [
"-Wno-error=unused-result"
"-Wno-error=stringop-truncation"
"-Wno-error=address-of-packed-member"
];
nativeBuildInputs = [ bison flex ];
patches = [ ./nix.patch ];
enableParallelBuilding = true;
nativeBuildInputs = [ bison flex cmake libpcap ];
buildInputs = [ libpcap ];

installPhase = ''
install -m 0755 -t $out/bin -D \
packetdrill \
packet_parser_test \
packet_to_string_test \
checksum_test
mkdir -p $out/share
cp -r ../tests $out/share/packetdrill-tests
'';

meta = {
description = "Quick, precise tests for entire TCP/UDP/IPv4/IPv6 network stacks";
homepage = "https://github.com/google/packetdrill";
Expand Down
24 changes: 0 additions & 24 deletions pkgs/tools/networking/packetdrill/nix.patch

This file was deleted.

0 comments on commit c4ea77f

Please sign in to comment.