bcc: 0.11.0 -> 0.12.0
- fix bash shebangs - fix reference to $out/share/bcc/tools/lib when scripts are started from $out/bin - use submodules to download libbpf
This commit is contained in:
parent
9e58ecd4ad
commit
ecbe18dd3b
@ -1,38 +1,25 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper, cmake, llvmPackages, kernel
|
||||
, flex, bison, elfutils, python, luajit, netperf, iperf, libelf
|
||||
, systemtap
|
||||
, systemtap, bash
|
||||
}:
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
version = "0.11.0";
|
||||
version = "0.12.0";
|
||||
name = "bcc-${version}";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "iovisor";
|
||||
repo = "bcc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1v2gzdd4k58f3yxmq4z97a7xh5vyd84flzzfr9k2cm29i93cwcam";
|
||||
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";
|
||||
src = fetchFromGitHub {
|
||||
owner = "iovisor";
|
||||
repo = "bcc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1r2yjxam23k56prsvjhqf8i8d3irhcvmy0bly6x23h1jc3zc6yym";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
format = "other";
|
||||
|
||||
buildInputs = with llvmPackages; [
|
||||
llvm clang-unwrapped kernel
|
||||
elfutils luajit netperf iperf
|
||||
systemtap.stapBuild flex
|
||||
systemtap.stapBuild flex bash
|
||||
];
|
||||
|
||||
patches = [
|
||||
@ -58,12 +45,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
patch -p1 < libbcc-path.patch
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
chmod -R u+w ../libbpf/
|
||||
rmdir src/cc/libbpf
|
||||
(cd src/cc && ln -svf ../../../libbpf/ libbpf)
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin $out/share
|
||||
rm -r $out/share/bcc/tools/old
|
||||
@ -76,6 +57,8 @@ python.pkgs.buildPythonApplication rec {
|
||||
if [ ! -e $bin ]; then
|
||||
ln -s $f $bin
|
||||
fi
|
||||
substituteInPlace "$f" \
|
||||
--replace '$(dirname $0)/lib' "$out/share/bcc/tools/lib"
|
||||
done
|
||||
|
||||
sed -i -e "s!lib=.*!lib=$out/bin!" $out/bin/{java,ruby,node,python}gc
|
||||
|
Loading…
Reference in New Issue
Block a user