nixpkgs/pkgs/os-specific/linux/bcc/default.nix

39 lines
1.3 KiB
Nix
Raw Normal View History

2016-04-05 19:51:02 +00:00
{ stdenv, fetchFromGitHub, makeWrapper, cmake, llvmPackages, kernel,
flex, bison, elfutils, python, pythonPackages, luajit, netperf, iperf }:
stdenv.mkDerivation rec {
2016-09-07 21:44:51 +00:00
version = "git-2016-08-30";
2016-04-05 19:51:02 +00:00
name = "bcc-${version}";
src = fetchFromGitHub {
owner = "iovisor";
repo = "bcc";
2016-09-07 21:44:51 +00:00
rev = "4c2b5388f8d685a127a4d757c254a380e0aa915c";
sha256 = "1bd4darmr60vfr5414zq0bd9rq42r6h3cwiiwjllksbi4v2jvx77";
2016-04-05 19:51:02 +00:00
};
buildInputs = [ makeWrapper cmake llvmPackages.llvm llvmPackages.clang-unwrapped kernel
flex bison elfutils python pythonPackages.netaddr luajit netperf iperf
];
cmakeFlags="-DBCC_KERNEL_MODULES_DIR=${kernel.dev}/lib/modules -DBCC_KERNEL_HAS_SOURCE_DIR=1";
postInstall = ''
mkdir -p $out/bin
for f in $out/share/bcc/tools\/*; do
ln -s $f $out/bin/$(basename $f)
wrapProgram $f \
--prefix LD_LIBRARY_PATH : $out/lib \
--prefix PYTHONPATH : $out/lib/python2.7/site-packages \
--prefix PYTHONPATH : :${pythonPackages.netaddr}/lib/${python.libPrefix}/site-packages
done
'';
meta = with stdenv.lib; {
description = "Dynamic Tracing Tools for Linux";
homepage = "https://iovisor.github.io/bcc/";
license = licenses.asl20;
maintainers = with maintainers; [ ragge ];
};
}