forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes NixOS#23679
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters