mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
Merge #159173: libbpf: 0.6.1 -> 0.7.0, bcc 0.23.0 -> 0.24.0
This commit is contained in:
commit
fe78cacdff
3 changed files with 10 additions and 11 deletions
|
@ -18,8 +18,12 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
# simple BEGIN probe (user probe on bpftrace itself)
|
# simple BEGIN probe (user probe on bpftrace itself)
|
||||||
print(machine.succeed("bpftrace -e 'BEGIN { print(\"ok\"); exit(); }'"))
|
print(machine.succeed("bpftrace -e 'BEGIN { print(\"ok\"); exit(); }'"))
|
||||||
# tracepoint
|
# tracepoint
|
||||||
print(machine.succeed("bpftrace -e 'tracepoint:syscalls:sys_enter_* { print(probe); exit(); }'"))
|
print(machine.succeed("bpftrace -e 'tracepoint:syscalls:sys_enter_* { print(probe); exit() }'"))
|
||||||
# kprobe
|
# kprobe
|
||||||
print(machine.succeed("bpftrace -e 'kprobe:schedule { print(probe); exit() }'"))
|
print(machine.succeed("bpftrace -e 'kprobe:schedule { print(probe); exit() }'"))
|
||||||
|
# BTF
|
||||||
|
print(machine.succeed("bpftrace -e 'kprobe:schedule { "
|
||||||
|
" printf(\"tgid: %d\", ((struct task_struct*) curtask)->tgid); exit() "
|
||||||
|
"}'"))
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
python.pkgs.buildPythonApplication rec {
|
python.pkgs.buildPythonApplication rec {
|
||||||
pname = "bcc";
|
pname = "bcc";
|
||||||
version = "0.23.0";
|
version = "0.24.0";
|
||||||
|
|
||||||
disabled = !stdenv.isLinux;
|
disabled = !stdenv.isLinux;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ python.pkgs.buildPythonApplication rec {
|
||||||
owner = "iovisor";
|
owner = "iovisor";
|
||||||
repo = "bcc";
|
repo = "bcc";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-iLVUwJTDQ8Bn38sgHOcIR8TYxIB+gIlfTgr9+gPU0gE=";
|
sha256 = "sha256-5Nq6LmphiyiiIyru/P2rCCmA25cwJIWn08oK1+eM3cQ=";
|
||||||
};
|
};
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
|
|
|
@ -12,20 +12,15 @@ with builtins;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libbpf";
|
pname = "libbpf";
|
||||||
version = "0.6.1";
|
version = "0.7.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "libbpf";
|
owner = "libbpf";
|
||||||
repo = "libbpf";
|
repo = "libbpf";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-/MLPflnfooe7Wjy8M3CTowAi5oYpscruSkDsaVzhmYQ=";
|
sha256 = "sha256-ieJ19igGCoPKGX6J0mQG+QD7QcXHX2SVzZUjMwxum/M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [(fetchpatch {
|
|
||||||
url = "https://github.com/libbpf/libbpf/pull/41.diff";
|
|
||||||
sha256 = "sha256-pg5WARqh6z0nkTHMBhftxwdV2SyswC2lfaCXCpez0VA=";
|
|
||||||
})];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ libelf zlib ];
|
buildInputs = [ libelf zlib ];
|
||||||
|
|
||||||
|
@ -38,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# install linux's libbpf-compatible linux/btf.h
|
# install linux's libbpf-compatible linux/btf.h
|
||||||
install -Dm444 include/uapi/linux/btf.h -t $out/include/linux
|
install -Dm444 include/uapi/linux/*.h -t $out/include/linux
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# FIXME: Multi-output requires some fixes to the way the pkg-config file is
|
# FIXME: Multi-output requires some fixes to the way the pkg-config file is
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue