diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2021-12-04 00:11:22 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2021-12-04 21:07:09 +0900 |
commit | efe6967e9359bda4b9407e0d2cf9d0b0a6666652 (patch) | |
tree | e8529921e3d5664103e692968c583422f34e7db4 /pkgs/os-specific/linux/bcc | |
parent | c52ea537b37afe1e2a4fcd33f4a8a5259a2da0ce (diff) |
bcc: move from linux-kernels packages to normal packages
bcc doesn't really need kernel itself, it just cares about module path. It's actually better to use /run/booted-system/kernel-modules/lib/modules for two reasons: - no need to rebuild bcc for each new kernel - can use a newer bcc with a booted kernel that doesn't match the current system
Diffstat (limited to 'pkgs/os-specific/linux/bcc')
-rw-r--r-- | pkgs/os-specific/linux/bcc/default.nix | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index 91e53d686a1b3..4e8f28a0eda1c 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub -, makeWrapper, cmake, llvmPackages, kernel +, makeWrapper, cmake, llvmPackages , flex, bison, elfutils, python, luajit, netperf, iperf, libelf -, systemtap, bash +, bash }: python.pkgs.buildPythonApplication rec { @@ -20,9 +20,9 @@ python.pkgs.buildPythonApplication rec { format = "other"; buildInputs = with llvmPackages; [ - llvm llvm.dev libclang kernel + llvm llvm.dev libclang elfutils luajit netperf iperf - systemtap.stapBuild flex bash + flex bash ]; patches = [ @@ -32,12 +32,10 @@ python.pkgs.buildPythonApplication rec { ]; propagatedBuildInputs = [ python.pkgs.netaddr ]; - nativeBuildInputs = [ makeWrapper cmake flex bison llvmPackages.llvm.dev ] - # libelf is incompatible with elfutils-libelf - ++ lib.filter (x: x != libelf) kernel.moduleBuildDependencies; + nativeBuildInputs = [ makeWrapper cmake flex bison llvmPackages.llvm.dev ]; cmakeFlags = [ - "-DBCC_KERNEL_MODULES_DIR=${kernel.dev}/lib/modules" + "-DBCC_KERNEL_MODULES_DIR=/run/booted-system/kernel-modules/lib/modules" "-DREVISION=${version}" "-DENABLE_USDT=ON" "-DENABLE_CPP_API=ON" |