nixpkgs/pkgs/os-specific/linux/bpftool/default.nix

31 lines
762 B
Nix
Raw Normal View History

{ stdenv
, libopcodes, libbfd, libelf
, linuxPackages_latest, zlib
2020-01-30 14:11:11 +00:00
, python3
}:
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
pname = "bpftool";
inherit (linuxPackages_latest.kernel) version src;
2020-01-30 14:11:11 +00:00
nativeBuildInputs = [ python3 ];
buildInputs = [ libopcodes libbfd libelf zlib ];
preConfigure = ''
2020-01-30 14:11:11 +00:00
patchShebangs scripts/bpf_helpers_doc.py
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 ];
};
}