2019-07-25 22:17:43 +02:00
|
|
|
{ stdenv, mkDerivation, fetchgit, qtbase, cmake, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
|
2019-08-13 23:52:01 +02:00
|
|
|
mkDerivation {
|
2019-04-28 12:56:20 +02:00
|
|
|
pname = "kernelshark";
|
2019-07-27 20:19:08 +02:00
|
|
|
version = "0.9.8";
|
2019-04-28 12:56:20 +02:00
|
|
|
|
2019-07-27 20:02:58 +02:00
|
|
|
src = fetchgit (import ./src.nix);
|
2019-04-28 12:56:20 +02:00
|
|
|
|
2019-07-25 22:13:17 +02:00
|
|
|
patches = [ ./fix-Makefiles.patch ];
|
|
|
|
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
preConfigure = "pushd kernel-shark";
|
2019-04-28 12:56:20 +02:00
|
|
|
|
2019-07-25 22:17:43 +02:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2019-04-28 12:56:20 +02:00
|
|
|
|
2019-07-25 21:30:46 +02:00
|
|
|
buildInputs = [ qtbase json_c mesa_glu freeglut pkg-config ];
|
2019-04-28 12:56:20 +02:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-D_INSTALL_PREFIX=${placeholder "out"}"
|
2019-07-27 20:19:08 +02:00
|
|
|
"-DTRACECMD_BIN_DIR=${trace-cmd}/bin"
|
2019-07-25 21:30:46 +02:00
|
|
|
"-DTRACECMD_INCLUDE_DIR=${trace-cmd.dev}/include"
|
|
|
|
"-DTRACECMD_LIBRARY=${trace-cmd.lib}/lib/libtracecmd.a"
|
|
|
|
"-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/libtraceevent.a"
|
2019-04-28 12:56:20 +02:00
|
|
|
];
|
|
|
|
|
2019-07-25 22:13:17 +02:00
|
|
|
preInstall = ''
|
|
|
|
popd
|
|
|
|
make install_gui_docs prefix=$doc
|
|
|
|
pushd kernel-shark/build
|
|
|
|
'';
|
|
|
|
|
2019-04-28 12:56:20 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GUI for trace-cmd which is an interface for the Linux kernel ftrace subsystem";
|
|
|
|
homepage = http://kernelshark.org/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
|
|
};
|
|
|
|
}
|