Merge pull request #189078 from martinetd/bpftrace
bcc: 0.24.0 -> 0.25.0; bpftrace: 0.15.0 -> 0.16.0
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "bcc";
|
||||
version = "0.24.0";
|
||||
version = "0.25.0";
|
||||
|
||||
disabled = !stdenv.isLinux;
|
||||
|
||||
@@ -15,7 +15,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
owner = "iovisor";
|
||||
repo = "bcc";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-5Nq6LmphiyiiIyru/P2rCCmA25cwJIWn08oK1+eM3cQ=";
|
||||
sha256 = "sha256-05FQWBxFI8bxjm6vDCoEqqpAd4Agn84M28P3G6F3tag=";
|
||||
};
|
||||
format = "other";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake, pkg-config, flex, bison
|
||||
, llvmPackages, elfutils
|
||||
, libbfd, libbpf, libopcodes, bcc
|
||||
@@ -9,44 +9,15 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpftrace";
|
||||
version = "0.15.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
|
||||
'';
|
||||
version = "0.16.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iovisor";
|
||||
repo = "bpftrace";
|
||||
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;
|
||||
[ llvm libclang
|
||||
elfutils bcc
|
||||
@@ -64,22 +35,13 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlags =
|
||||
[ "-DBUILD_TESTING=FALSE"
|
||||
"-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
|
||||
# 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 = ''
|
||||
rm -rf $out/share/bpftrace/tools/doc
|
||||
|
||||
ln -s $out/share/bpftrace/tools/*.bt $out/bin/
|
||||
chmod +x $out/bin/*.bt
|
||||
'';
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "oci-seccomp-bpf-hook";
|
||||
version = "1.2.6";
|
||||
version = "1.2.8";
|
||||
src = fetchFromGitHub {
|
||||
owner = "containers";
|
||||
repo = "oci-seccomp-bpf-hook";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+HGVxPBCPIdFwzZf3lFE0MWA2xMKsHQkfDo4zyNgzpg=";
|
||||
sha256 = "sha256-0SSiVnCWs3NLefnmZn1oCc7nwTrSzDsyjPszVBRQVH0=";
|
||||
};
|
||||
vendorSha256 = null;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub, systemd, nixosTests, bcc }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, systemd, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "grafana-agent";
|
||||
@@ -27,6 +27,7 @@ buildGoModule rec {
|
||||
|
||||
tags = [
|
||||
"nonetwork"
|
||||
"noebpf"
|
||||
"nodocker"
|
||||
];
|
||||
|
||||
@@ -39,8 +40,6 @@ buildGoModule rec {
|
||||
# https://github.com/coreos/go-systemd/issues/351
|
||||
NIX_CFLAGS_COMPILE = [ "-I${lib.getDev systemd}/include" ];
|
||||
|
||||
buildInputs = [ bcc ];
|
||||
|
||||
# tries to access /sys: https://github.com/grafana/agent/issues/333
|
||||
preBuild = ''
|
||||
rm pkg/integrations/node_exporter/node_exporter_test.go
|
||||
|
||||
@@ -5105,6 +5105,8 @@ with pkgs;
|
||||
|
||||
oci-cli = callPackage ../tools/admin/oci-cli { };
|
||||
|
||||
oci-seccomp-bpf-hook = callPackage ../os-specific/linux/oci-seccomp-bpf-hook { };
|
||||
|
||||
ocrmypdf = with python3.pkgs; toPythonApplication ocrmypdf;
|
||||
|
||||
ocrfeeder = callPackage ../applications/graphics/ocrfeeder { };
|
||||
@@ -16771,10 +16773,15 @@ with pkgs;
|
||||
bpftools = callPackage ../os-specific/linux/bpftools { };
|
||||
|
||||
bcc = callPackage ../os-specific/linux/bcc {
|
||||
python = pkgs.python3;
|
||||
python = python3;
|
||||
libbpf = libbpf_1;
|
||||
llvmPackages = llvmPackages_14;
|
||||
};
|
||||
|
||||
bpftrace = callPackage ../os-specific/linux/bpftrace { };
|
||||
bpftrace = callPackage ../os-specific/linux/bpftrace {
|
||||
libbpf = libbpf_1;
|
||||
llvmPackages = llvmPackages_14;
|
||||
};
|
||||
|
||||
bpm-tools = callPackage ../tools/audio/bpm-tools { };
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ in {
|
||||
# Obsolete aliases (these packages do not depend on the kernel).
|
||||
inherit (pkgs) odp-dpdk pktgen; # added 2018-05
|
||||
inherit (pkgs) bcc bpftrace; # added 2021-12
|
||||
inherit (pkgs) oci-seccomp-bpf-hook; # added 2022-11
|
||||
|
||||
acpi_call = callPackage ../os-specific/linux/acpi-call {};
|
||||
|
||||
@@ -421,8 +422,6 @@ in {
|
||||
|
||||
netatop = callPackage ../os-specific/linux/netatop { };
|
||||
|
||||
oci-seccomp-bpf-hook = if lib.versionAtLeast kernel.version "5.4" then callPackage ../os-specific/linux/oci-seccomp-bpf-hook { } else null;
|
||||
|
||||
perf = callPackage ../os-specific/linux/kernel/perf { };
|
||||
|
||||
phc-intel = if lib.versionAtLeast kernel.version "4.10" then callPackage ../os-specific/linux/phc-intel { } else null;
|
||||
|
||||
Reference in New Issue
Block a user