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>

+33 -17
+31 -15
pkgs/os-specific/linux/bcc/default.nix
··· 4 4 }: 5 5 6 6 python.pkgs.buildPythonApplication rec { 7 - version = "0.8.0"; 7 + version = "0.9.0"; 8 8 name = "bcc-${version}"; 9 9 10 - src = fetchFromGitHub { 11 - owner = "iovisor"; 12 - repo = "bcc"; 13 - rev = "v${version}"; 14 - sha256 = "15vvybllmh9hdj801v3psd671c0qq2a1xdv73kabb9r4fzgaknxk"; 15 - }; 10 + srcs = [ 11 + (fetchFromGitHub { 12 + owner = "iovisor"; 13 + repo = "bcc"; 14 + rev = "v${version}"; 15 + sha256 = "0gi12bsjaw1d77rx11wkdg4szcydwy55z6mkx558nfvdym0qj7yw"; 16 + name = "bcc"; 17 + }) 16 18 19 + # note: keep this in sync with the version that was used at the time of the 20 + # tagged release! 21 + (fetchFromGitHub { 22 + owner = "libbpf"; 23 + repo = "libbpf"; 24 + rev = "5beb8a2ebffd1045e3edb9b522d6ff5bb477c541"; 25 + sha256 = "19n6baqj0mbaphzxkpn09m5a7cbij7fxap8ckk488nxqdz7nbsal"; 26 + name = "libbpf"; 27 + }) 28 + ]; 29 + sourceRoot = "bcc"; 17 30 format = "other"; 18 31 19 - buildInputs = [ 20 - llvmPackages.llvm llvmPackages.clang-unwrapped kernel 32 + buildInputs = with llvmPackages; [ 33 + llvm clang-unwrapped kernel 21 34 elfutils luajit netperf iperf 22 35 systemtap.stapBuild flex 23 36 ]; ··· 28 41 ./fix-deadlock-detector-import.patch 29 42 ]; 30 43 44 + propagatedBuildInputs = [ python.pkgs.netaddr ]; 31 45 nativeBuildInputs = [ makeWrapper cmake flex bison ] 32 46 # libelf is incompatible with elfutils-libelf 33 47 ++ stdenv.lib.filter (x: x != libelf) kernel.moduleBuildDependencies; ··· 44 58 patch -p1 < libbcc-path.patch 45 59 ''; 46 60 47 - propagatedBuildInputs = [ 48 - python.pkgs.netaddr 49 - ]; 61 + preConfigure = '' 62 + chmod -R u+w ../libbpf/ 63 + rmdir src/cc/libbpf 64 + (cd src/cc && ln -svf ../../../libbpf/ libbpf) 65 + ''; 50 66 51 67 postInstall = '' 52 68 mkdir -p $out/bin $out/share ··· 71 87 72 88 meta = with stdenv.lib; { 73 89 description = "Dynamic Tracing Tools for Linux"; 74 - homepage = https://iovisor.github.io/bcc/; 75 - license = licenses.asl20; 76 - maintainers = with maintainers; [ ragge mic92 ]; 90 + homepage = https://iovisor.github.io/bcc/; 91 + license = licenses.asl20; 92 + maintainers = with maintainers; [ ragge mic92 thoughtpolice ]; 77 93 }; 78 94 }
+2 -2
pkgs/os-specific/linux/bcc/fix-deadlock-detector-import.patch
··· 1 - --- source.org/tools/deadlock_detector.py 1980-01-02 00:00:00.000000000 +0000 2 - +++ source/tools/deadlock_detector.py 2018-05-29 13:57:11.807126673 +0100 1 + --- source.org/tools/deadlock.py 1980-01-02 00:00:00.000000000 +0000 2 + +++ source/tools/deadlock.py 2018-05-29 13:57:11.807126673 +0100 3 3 @@ -44,9 +44,8 @@ 4 4 # 5 5 # 01-Feb-2017 Kenny Yu Created this.