packetdrill: init at 1.0

Closes https://github.com/NixOS/nixpkgs/pull/23679
This commit is contained in:
David Johnson 2017-03-09 14:54:04 -08:00 committed by Joachim Fasting
parent 798623fd2b
commit 2151e3b8eb
No known key found for this signature in database
GPG key ID: 7544761007FE4E08
4 changed files with 52 additions and 0 deletions

View file

@ -133,6 +133,7 @@
dgonyeo = "Derek Gonyeo <derek@gonyeo.com>";
dipinhora = "Dipin Hora <dipinhora+github@gmail.com>";
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
dmjio = "David Johnson <djohnson.m@gmail.com>";
dochang = "Desmond O. Chang <dochang@gmail.com>";
domenkozar = "Domen Kozar <domen@dev.si>";
doublec = "Chris Double <chris.double@double.co.nz>";

View file

@ -0,0 +1,25 @@
{ stdenv, fetchFromGitHub, bison, flex }:
stdenv.mkDerivation rec {
version = "1.0";
name = "packetdrill-${version}";
src = fetchFromGitHub {
owner = "google";
repo = "packetdrill";
rev = "58a7865c47e3a71e92ca0e4cc478c320e1c35f82";
sha256 = "09sqiakmn63idfjhy2ddf1456sfhi8yhsbp8lxvc1yfjikjxwwbc";
};
setSourceRoot = ''
export sourceRoot=$(realpath */gtests/net/packetdrill)
'';
hardeningDisable = [ "all" ];
buildInputs = [ 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.unix;
maintainers = with stdenv.lib.maintainers; [ dmjio cleverca22 ];
};
}

View file

@ -0,0 +1,24 @@
diff --git a/gtests/net/packetdrill/Makefile.common b/gtests/net/packetdrill/Makefile.common
index 0ec741f..bf1cbb1 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -33,7 +33,7 @@ packetdrill-lib := \
packetdrill-objs := packetdrill.o $(packetdrill-lib)
packetdrill: $(packetdrill-objs)
- $(CC) -o packetdrill -g -static $(packetdrill-objs) $(packetdrill-ext-libs)
+ $(CC) -o packetdrill -g $(packetdrill-objs) $(packetdrill-ext-libs)
test-bins := checksum_test packet_parser_test packet_to_string_test
tests: $(test-bins)
@@ -43,6 +43,10 @@ tests: $(test-bins)
binaries: packetdrill $(test-bins)
+install: packetdrill $(test-bins)
+ mkdir -p ${out}/bin
+ cp -vi $^ ${out}/bin
+
checksum_test-objs := $(packetdrill-lib) checksum_test.o
checksum_test: $(checksum_test-objs)
$(CC) -o checksum_test $(checksum_test-objs) $(packetdrill-ext-libs)

View file

@ -3289,6 +3289,8 @@ with pkgs;
nix = nixUnstable;
};
packetdrill = callPackage ../tools/networking/packetdrill { };
pakcs = callPackage ../development/compilers/pakcs {};
pal = callPackage ../tools/misc/pal { };