Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
47 lines
970 B
Nix
47 lines
970 B
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
clang,
|
|
libpcap,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "pwru";
|
|
version = "1.0.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cilium";
|
|
repo = "pwru";
|
|
rev = "v${version}";
|
|
hash = "sha256-3lIKbzwPX6okJT9CeErX5/innUK3VqnnbWPpvlSN+6U=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
nativeBuildInputs = [ clang ];
|
|
|
|
buildInputs = [ libpcap ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace internal/libpcap/compile.go \
|
|
--replace "-static" ""
|
|
'';
|
|
|
|
# this breaks go generate as bpf does not support -fzero-call-used-regs=used-gpr
|
|
hardeningDisable = [ "zerocallusedregs" ];
|
|
|
|
preBuild = ''
|
|
TARGET_GOARCH="$GOARCH" GOOS= GOARCH= go generate
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "eBPF-based Linux kernel networking debugger";
|
|
homepage = "https://github.com/cilium/pwru";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ nickcao ];
|
|
platforms = platforms.linux;
|
|
mainProgram = "pwru";
|
|
};
|
|
}
|