2014-03-02 12:53:08 +01:00
|
|
|
{ stdenv, fetchgit, kernel, useFFI ? false }:
|
2014-02-19 12:00:45 +01:00
|
|
|
|
2014-03-02 12:53:08 +01:00
|
|
|
let
|
|
|
|
ffiArgs = stdenv.lib.optionalString useFFI "FFI=1";
|
|
|
|
in
|
2014-02-19 12:00:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ktap-${version}";
|
2014-03-02 12:52:34 +01:00
|
|
|
version = "0.5-e7a38ef0";
|
2014-02-19 12:00:45 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/ktap/ktap.git";
|
2014-03-02 12:52:34 +01:00
|
|
|
rev = "e7a38ef06bec9a651c9e8bdb3ad66a104210d475";
|
|
|
|
sha256 = "07acf20e1926d3afd89b13855154b8cc792c57261e7d3cae2da70cb08844f9c8";
|
2014-02-19 12:00:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
2014-03-02 12:53:08 +01:00
|
|
|
make ${ffiArgs} KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
|
2014-02-19 12:00:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/sbin
|
|
|
|
cp ktap $out/sbin
|
|
|
|
make modules_install KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build INSTALL_MOD_PATH=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A lightweight script-based dynamic tracing tool for Linux.";
|
|
|
|
homepage = "http://www.ktap.org";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|