1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/networking/packetdrill/default.nix
Robert Scott 87fad4d39e packetdrill: 1.0 -> unstable-2020-08-22, fix build
also switch to cmake build
2020-10-08 19:52:13 +01:00

42 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, bison, flex, cmake, libpcap }:
stdenv.mkDerivation rec {
pname = "packetdrill";
version = "unstable-2020-08-22";
src = fetchFromGitHub {
owner = "google";
repo = "packetdrill";
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 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";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ dmjio cleverca22 ];
};
}