summary refs log tree commit diff
path: root/pkgs/tools/networking/packetdrill/default.nix
blob: 13aa8fcbd00af16b49d53b56aad4b249ecef2cf3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ stdenv, fetchFromGitHub, bison, flex }:
stdenv.mkDerivation rec {
  version = "1.0";
  pname = "packetdrill";
  src = fetchFromGitHub {
    owner = "google";
    repo = "packetdrill";
    rev = "58a7865c47e3a71e92ca0e4cc478c320e1c35f82";
    sha256 = "09sqiakmn63idfjhy2ddf1456sfhi8yhsbp8lxvc1yfjikjxwwbc";
  };
  setSourceRoot = ''
    export sourceRoot=$(realpath */gtests/net/packetdrill)
  '';
  NIX_CFLAGS_COMPILE = "-Wno-error=unused-result";
  nativeBuildInputs = [ bison flex ];
  patches = [ ./nix.patch ];
  enableParallelBuilding = true;
  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 ];
  };
}