bcc: 0.26.0 -> 0.28.0 (#240520)

* bcc: 0.26.0 -> 0.28.0

update now calls setuptool through cmake which installs an egg file,
this apparently requires setting a PYTHONPATH which includes the
output dir to work.

While here, make it clear we only support python3 as 'python' in
nixpkgs is still python2 even if it's no longer usable...

* bcc/bpftrace: use llvm 16
This commit is contained in:
Dominique Martinet 2023-07-18 03:10:38 +09:00 committed by GitHub
parent 87dfa27960
commit 184dfbc8a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 13 deletions

View File

@ -1,13 +1,26 @@
{ lib, stdenv, fetchFromGitHub
, makeWrapper, cmake, llvmPackages
, flex, bison, elfutils, python, luajit, netperf, iperf, libelf
, bash, libbpf, nixosTests
, audit
{ audit
, bash
, bison
, cmake
, elfutils
, fetchFromGitHub
, flex
, iperf
, lib
, libbpf
, llvmPackages
, luajit
, makeWrapper
, netperf
, nixosTests
, python3
, stdenv
, zip
}:
python.pkgs.buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "bcc";
version = "0.26.0";
version = "0.28.0";
disabled = !stdenv.isLinux;
@ -15,7 +28,7 @@ python.pkgs.buildPythonApplication rec {
owner = "iovisor";
repo = "bcc";
rev = "v${version}";
sha256 = "sha256-zx38tPwuuGU6px9pRNN5JtvBysK9fStOvoqe7cLo7LM=";
sha256 = "sha256-+ecSaVroDC2bWbio4JsuwEvHQdCMpxLt7hIkeREMJs8=";
};
format = "other";
@ -31,8 +44,16 @@ python.pkgs.buildPythonApplication rec {
./fix-deadlock-detector-import.patch
];
propagatedBuildInputs = [ python.pkgs.netaddr ];
nativeBuildInputs = [ makeWrapper cmake flex bison llvmPackages.llvm.dev ];
propagatedBuildInputs = [ python3.pkgs.netaddr ];
nativeBuildInputs = [
bison
cmake
flex
llvmPackages.llvm.dev
makeWrapper
python3.pkgs.setuptools
zip
];
cmakeFlags = [
"-DBCC_KERNEL_MODULES_DIR=/run/booted-system/kernel-modules/lib/modules"
@ -59,6 +80,10 @@ python.pkgs.buildPythonApplication rec {
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
preInstall = ''
# required for setuptool during install
export PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
'';
postInstall = ''
mkdir -p $out/bin $out/share
rm -r $out/share/bcc/tools/old

View File

@ -18474,12 +18474,11 @@ with pkgs;
bpftools = callPackage ../os-specific/linux/bpftools { };
bcc = callPackage ../os-specific/linux/bcc {
python = python3;
llvmPackages = llvmPackages_14;
llvmPackages = llvmPackages_16;
};
bpftrace = callPackage ../os-specific/linux/bpftrace {
llvmPackages = llvmPackages_14;
llvmPackages = llvmPackages_16;
};
bpm-tools = callPackage ../tools/audio/bpm-tools { };