2019-06-16 21:59:06 +02:00
|
|
|
{ stdenv
|
2019-05-06 09:31:22 +02:00
|
|
|
, libopcodes, libbfd, libelf
|
2019-12-26 21:07:51 +01:00
|
|
|
, linuxPackages_latest, zlib
|
2020-01-30 15:11:11 +01:00
|
|
|
, python3
|
2019-05-06 09:31:22 +02:00
|
|
|
}:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-05-06 09:31:22 +02:00
|
|
|
pname = "bpftool";
|
|
|
|
inherit (linuxPackages_latest.kernel) version src;
|
|
|
|
|
2020-01-30 15:11:11 +01:00
|
|
|
nativeBuildInputs = [ python3 ];
|
2019-12-26 21:07:51 +01:00
|
|
|
buildInputs = [ libopcodes libbfd libelf zlib ];
|
2019-05-06 09:31:22 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
2020-01-30 15:11:11 +01:00
|
|
|
patchShebangs scripts/bpf_helpers_doc.py
|
|
|
|
|
2019-05-06 09:31:22 +02:00
|
|
|
cd tools/bpf/bpftool
|
|
|
|
substituteInPlace ./Makefile \
|
|
|
|
--replace '/usr/local' "$out" \
|
|
|
|
--replace '/usr' "$out" \
|
|
|
|
--replace '/sbin' '/bin'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Debugging/program analysis tool for the eBPF subsystem";
|
|
|
|
license = [ licenses.gpl2 licenses.bsd2 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|