bcc: 0.11.0 -> 0.12.0 (#75479)

bcc: 0.11.0 -> 0.12.0
This commit is contained in:
Jörg Thalheim 2019-12-13 10:13:40 +00:00 committed by GitHub
commit 8d2139d063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,38 +1,25 @@
{ stdenv, fetchFromGitHub, makeWrapper, cmake, llvmPackages, kernel { stdenv, fetchFromGitHub, makeWrapper, cmake, llvmPackages, kernel
, flex, bison, elfutils, python, luajit, netperf, iperf, libelf , flex, bison, elfutils, python, luajit, netperf, iperf, libelf
, systemtap , systemtap, bash
}: }:
python.pkgs.buildPythonApplication rec { python.pkgs.buildPythonApplication rec {
version = "0.11.0"; version = "0.12.0";
name = "bcc-${version}"; name = "bcc-${version}";
srcs = [ src = fetchFromGitHub {
(fetchFromGitHub { owner = "iovisor";
owner = "iovisor"; repo = "bcc";
repo = "bcc"; rev = "v${version}";
rev = "v${version}"; sha256 = "1r2yjxam23k56prsvjhqf8i8d3irhcvmy0bly6x23h1jc3zc6yym";
sha256 = "1v2gzdd4k58f3yxmq4z97a7xh5vyd84flzzfr9k2cm29i93cwcam"; fetchSubmodules = true;
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 = "a30df5c09fb3941fc42c4570ed2545e7057bf82a";
sha256 = "088vb9sfs1zazlqi6abb3ia1xgpmwiz5pmz6y3a6gbh0zdrgh6px";
name = "libbpf";
})
];
sourceRoot = "bcc";
format = "other"; format = "other";
buildInputs = with llvmPackages; [ buildInputs = with llvmPackages; [
llvm clang-unwrapped kernel llvm clang-unwrapped kernel
elfutils luajit netperf iperf elfutils luajit netperf iperf
systemtap.stapBuild flex systemtap.stapBuild flex bash
]; ];
patches = [ patches = [
@ -58,12 +45,6 @@ python.pkgs.buildPythonApplication rec {
patch -p1 < libbcc-path.patch patch -p1 < libbcc-path.patch
''; '';
preConfigure = ''
chmod -R u+w ../libbpf/
rmdir src/cc/libbpf
(cd src/cc && ln -svf ../../../libbpf/ libbpf)
'';
postInstall = '' postInstall = ''
mkdir -p $out/bin $out/share mkdir -p $out/bin $out/share
rm -r $out/share/bcc/tools/old rm -r $out/share/bcc/tools/old
@ -76,6 +57,8 @@ python.pkgs.buildPythonApplication rec {
if [ ! -e $bin ]; then if [ ! -e $bin ]; then
ln -s $f $bin ln -s $f $bin
fi fi
substituteInPlace "$f" \
--replace '$(dirname $0)/lib' "$out/share/bcc/tools/lib"
done done
sed -i -e "s!lib=.*!lib=$out/bin!" $out/bin/{java,ruby,node,python}gc sed -i -e "s!lib=.*!lib=$out/bin!" $out/bin/{java,ruby,node,python}gc