diff options
author | Austin Seipp <aseipp@pobox.com> | 2019-05-06 01:12:02 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2019-05-06 01:42:02 -0500 |
commit | 0a4cd28f84ed85eec38b0fc53f2b2079a13da2f2 (patch) | |
tree | 1ee841d0ff30483d787004ebc11ddb5e5fd025c4 /pkgs/os-specific/linux/bcc | |
parent | 181e97175556db5692a19ea6d7be3705568757d2 (diff) |
linuxPackages.bcc: 0.8.0 -> 0.9.0
Requires a minor tweak to the deadlock detector patch (the file was renamed in the upstream repo). bcc now also wants a copy of libbpf, which it doesn't have in the source release tarball. Clone a copy from GiHub that's synchronized with the release, and put it in place. Tested on Linux 5.1 (with bpftrace as well). Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/os-specific/linux/bcc')
-rw-r--r-- | pkgs/os-specific/linux/bcc/default.nix | 46 | ||||
-rw-r--r-- | pkgs/os-specific/linux/bcc/fix-deadlock-detector-import.patch | 4 |
2 files changed, 33 insertions, 17 deletions
diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index 885de8163be3e..013c847112bb7 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -4,20 +4,33 @@ }: python.pkgs.buildPythonApplication rec { - version = "0.8.0"; + version = "0.9.0"; name = "bcc-${version}"; - src = fetchFromGitHub { - owner = "iovisor"; - repo = "bcc"; - rev = "v${version}"; - sha256 = "15vvybllmh9hdj801v3psd671c0qq2a1xdv73kabb9r4fzgaknxk"; - }; + srcs = [ + (fetchFromGitHub { + owner = "iovisor"; + repo = "bcc"; + rev = "v${version}"; + sha256 = "0gi12bsjaw1d77rx11wkdg4szcydwy55z6mkx558nfvdym0qj7yw"; + name = "bcc"; + }) + # note: keep this in sync with the version that was used at the time of the + # tagged release! + (fetchFromGitHub { + owner = "libbpf"; + repo = "libbpf"; + rev = "5beb8a2ebffd1045e3edb9b522d6ff5bb477c541"; + sha256 = "19n6baqj0mbaphzxkpn09m5a7cbij7fxap8ckk488nxqdz7nbsal"; + name = "libbpf"; + }) + ]; + sourceRoot = "bcc"; format = "other"; - buildInputs = [ - llvmPackages.llvm llvmPackages.clang-unwrapped kernel + buildInputs = with llvmPackages; [ + llvm clang-unwrapped kernel elfutils luajit netperf iperf systemtap.stapBuild flex ]; @@ -28,6 +41,7 @@ python.pkgs.buildPythonApplication rec { ./fix-deadlock-detector-import.patch ]; + propagatedBuildInputs = [ python.pkgs.netaddr ]; nativeBuildInputs = [ makeWrapper cmake flex bison ] # libelf is incompatible with elfutils-libelf ++ stdenv.lib.filter (x: x != libelf) kernel.moduleBuildDependencies; @@ -44,9 +58,11 @@ python.pkgs.buildPythonApplication rec { patch -p1 < libbcc-path.patch ''; - propagatedBuildInputs = [ - python.pkgs.netaddr - ]; + preConfigure = '' + chmod -R u+w ../libbpf/ + rmdir src/cc/libbpf + (cd src/cc && ln -svf ../../../libbpf/ libbpf) + ''; postInstall = '' mkdir -p $out/bin $out/share @@ -71,8 +87,8 @@ python.pkgs.buildPythonApplication rec { meta = with stdenv.lib; { description = "Dynamic Tracing Tools for Linux"; - homepage = https://iovisor.github.io/bcc/; - license = licenses.asl20; - maintainers = with maintainers; [ ragge mic92 ]; + homepage = https://iovisor.github.io/bcc/; + license = licenses.asl20; + maintainers = with maintainers; [ ragge mic92 thoughtpolice ]; }; } diff --git a/pkgs/os-specific/linux/bcc/fix-deadlock-detector-import.patch b/pkgs/os-specific/linux/bcc/fix-deadlock-detector-import.patch index 87ce618a0dd9d..1c422635f4fef 100644 --- a/pkgs/os-specific/linux/bcc/fix-deadlock-detector-import.patch +++ b/pkgs/os-specific/linux/bcc/fix-deadlock-detector-import.patch @@ -1,5 +1,5 @@ ---- source.org/tools/deadlock_detector.py 1980-01-02 00:00:00.000000000 +0000 -+++ source/tools/deadlock_detector.py 2018-05-29 13:57:11.807126673 +0100 +--- source.org/tools/deadlock.py 1980-01-02 00:00:00.000000000 +0000 ++++ source/tools/deadlock.py 2018-05-29 13:57:11.807126673 +0100 @@ -44,9 +44,8 @@ # # 01-Feb-2017 Kenny Yu Created this. |