bpftrace: 0.15.0 -> 0.16.0
note bcc 0.25.0 breaks bpftrace 0.15.0, so this needs to be together with bcc upgrade
This commit is contained in:
parent
c35e6853fd
commit
c09962fb2c
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
{ lib, stdenv, fetchFromGitHub
|
||||||
, cmake, pkg-config, flex, bison
|
, cmake, pkg-config, flex, bison
|
||||||
, llvmPackages, elfutils
|
, llvmPackages, elfutils
|
||||||
, libbfd, libbpf, libopcodes, bcc
|
, libbfd, libbpf, libopcodes, bcc
|
||||||
|
@ -9,44 +9,15 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "bpftrace";
|
pname = "bpftrace";
|
||||||
version = "0.15.0";
|
version = "0.16.0";
|
||||||
|
|
||||||
# Cherry-picked from merged PR, remove this hook on next update
|
|
||||||
# https://github.com/iovisor/bpftrace/pull/2242
|
|
||||||
# Cannot `fetchpatch` such pure renaming diff since
|
|
||||||
# https://github.com/iovisor/bpftrace/commit/2df807dbae4037aa8bf0afc03f52fb3f6321c62a.patch
|
|
||||||
# does not contain any diff in unified format but just this instead:
|
|
||||||
# ...
|
|
||||||
# man/man8/{bashreadline.8 => bashreadline.bt.8} | 0
|
|
||||||
# ...
|
|
||||||
# 35 files changed, 0 insertions(+), 0 deletions(-)
|
|
||||||
# rename man/man8/{bashreadline.8 => bashreadline.bt.8} (100%)
|
|
||||||
# ...
|
|
||||||
# on witch `fetchpatch` fails with
|
|
||||||
# error: Normalized patch '/build/patch' is empty (while the fetched file was not)!
|
|
||||||
# Did you maybe fetch a HTML representation of a patch instead of a raw patch?
|
|
||||||
postUnpack = ''
|
|
||||||
rename .8 .bt.8 "$sourceRoot"/man/man8/*.8
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "iovisor";
|
owner = "iovisor";
|
||||||
repo = "bpftrace";
|
repo = "bpftrace";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-9adZAKSn00W2yNwVDbVB1/O5Y+10c4EkVJGCHyd4Tgg=";
|
sha256 = "sha256-S43KS/qpzxU+Sgkcud4Cyx4yRjaT6SZzLv6R6bg5I2w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Pull upstream fix for binutils-2.39:
|
|
||||||
# https://github.com/iovisor/bpftrace/pull/2328
|
|
||||||
(fetchpatch {
|
|
||||||
name = "binutils-2.39.patch";
|
|
||||||
url = "https://github.com/iovisor/bpftrace/commit/3be6e708d514d3378a4fe985ab907643ecbc77ee.patch";
|
|
||||||
sha256 = "sha256-WWEh8ViGw8053nEG/29KeKEHV5ossWPtL/AAV/l+pnY=";
|
|
||||||
excludes = [ "CHANGELOG.md" ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with llvmPackages;
|
buildInputs = with llvmPackages;
|
||||||
[ llvm libclang
|
[ llvm libclang
|
||||||
elfutils bcc
|
elfutils bcc
|
||||||
|
@ -64,22 +35,13 @@ stdenv.mkDerivation rec {
|
||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
[ "-DBUILD_TESTING=FALSE"
|
[ "-DBUILD_TESTING=FALSE"
|
||||||
"-DLIBBCC_INCLUDE_DIRS=${bcc}/include"
|
"-DLIBBCC_INCLUDE_DIRS=${bcc}/include"
|
||||||
|
"-DINSTALL_TOOL_DOCS=off"
|
||||||
];
|
];
|
||||||
|
|
||||||
# nuke the example/reference output .txt files, for the included tools,
|
|
||||||
# stuffed inside $out. we don't need them at all.
|
|
||||||
# (see "Allow skipping examples" for a potential option
|
|
||||||
# https://github.com/iovisor/bpftrace/pull/2256)
|
|
||||||
#
|
|
||||||
# Pull BPF scripts into $PATH (next to their bcc program equivalents), but do
|
# Pull BPF scripts into $PATH (next to their bcc program equivalents), but do
|
||||||
# not move them to keep `${pkgs.bpftrace}/share/bpftrace/tools/...` working.
|
# not move them to keep `${pkgs.bpftrace}/share/bpftrace/tools/...` working.
|
||||||
# (remove `chmod` once a new release "Add executable permission to tools"
|
|
||||||
# https://github.com/iovisor/bpftrace/commit/77e524e6d276216ed6a6e1984cf204418db07c78)
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm -rf $out/share/bpftrace/tools/doc
|
|
||||||
|
|
||||||
ln -s $out/share/bpftrace/tools/*.bt $out/bin/
|
ln -s $out/share/bpftrace/tools/*.bt $out/bin/
|
||||||
chmod +x $out/bin/*.bt
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
|
@ -16755,7 +16755,9 @@ with pkgs;
|
||||||
libbpf = libbpf_1;
|
libbpf = libbpf_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
bpftrace = callPackage ../os-specific/linux/bpftrace { };
|
bpftrace = callPackage ../os-specific/linux/bpftrace {
|
||||||
|
libbpf = libbpf_1
|
||||||
|
};
|
||||||
|
|
||||||
bpm-tools = callPackage ../tools/audio/bpm-tools { };
|
bpm-tools = callPackage ../tools/audio/bpm-tools { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue