2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, libopcodes, libbfd, libelf
|
|
|
|
, linuxPackages_latest, zlib
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "bpftool";
|
|
|
|
inherit (linuxPackages_latest.kernel) version src;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ python3 ];
|
|
|
|
buildInputs = [ libopcodes libbfd libelf zlib ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs scripts/bpf_helpers_doc.py
|
|
|
|
|
|
|
|
cd tools/bpf/bpftool
|
|
|
|
substituteInPlace ./Makefile \
|
|
|
|
--replace '/usr/local' "$out" \
|
|
|
|
--replace '/usr' "$out" \
|
|
|
|
--replace '/sbin' '/bin'
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Debugging/program analysis tool for the eBPF subsystem";
|
|
|
|
license = [ licenses.gpl2 licenses.bsd2 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|