diff options
author | Robert Scott <code@humanleg.org.uk> | 2020-10-07 20:21:31 +0100 |
---|---|---|
committer | Robert Scott <code@humanleg.org.uk> | 2020-10-08 19:52:13 +0100 |
commit | 87fad4d39e3202867441fea1be4326660d4d2fa2 (patch) | |
tree | 699de0d84da56564fa1a24696ab5a2df4f177b23 /pkgs | |
parent | c2ebb8becb3eed09bf3b4e3b9423f75aad04e6ab (diff) | |
download | nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.tar nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.tar.gz nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.tar.bz2 nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.tar.lz nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.tar.xz nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.tar.zst nixpkgs-87fad4d39e3202867441fea1be4326660d4d2fa2.zip |
packetdrill: 1.0 -> unstable-2020-08-22, fix build
also switch to cmake build
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/networking/packetdrill/default.nix | 28 | ||||
-rw-r--r-- | pkgs/tools/networking/packetdrill/nix.patch | 24 |
2 files changed, 20 insertions, 32 deletions
diff --git a/pkgs/tools/networking/packetdrill/default.nix b/pkgs/tools/networking/packetdrill/default.nix index e4322242e0b..2b1467cd348 100644 --- a/pkgs/tools/networking/packetdrill/default.nix +++ b/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"; diff --git a/pkgs/tools/networking/packetdrill/nix.patch b/pkgs/tools/networking/packetdrill/nix.patch deleted file mode 100644 index 6bad14421b9..00000000000 --- a/pkgs/tools/networking/packetdrill/nix.patch +++ /dev/null @@ -1,24 +0,0 @@ -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) |