diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index 65aef6940383..acdaa6796d65 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ffc72e80cb2..a3ed50c6ff5b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };