2021-01-25 09:26:54 +01:00
|
|
|
{ lib, mkDerivation, fetchgit, qtbase, cmake, asciidoc, docbook_xsl, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
|
2021-03-11 13:12:34 +01:00
|
|
|
mkDerivation rec {
|
2019-04-28 12:56:20 +02:00
|
|
|
pname = "kernelshark";
|
2021-03-11 13:12:34 +01:00
|
|
|
version = "1.2";
|
2019-04-28 12:56:20 +02:00
|
|
|
|
2021-03-11 13:12:34 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
|
|
|
|
rev = "kernelshark-v${version}";
|
|
|
|
sha256 = "0wzzm2imk9n94v96v6sbvbff6j47lz4qj0snhiyv3nj3slg0anvh";
|
|
|
|
};
|
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-10-26 14:35:38 +02:00
|
|
|
nativeBuildInputs = [ pkg-config cmake asciidoc ];
|
2019-04-28 12:56:20 +02:00
|
|
|
|
2019-10-26 14:35:38 +02:00
|
|
|
buildInputs = [ qtbase json_c mesa_glu freeglut ];
|
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"
|
2019-10-26 14:35:38 +02:00
|
|
|
"-DTRACECMD_LIBRARY=${trace-cmd.lib}/lib/trace-cmd/libtracecmd.a"
|
|
|
|
"-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/traceevent/libtraceevent.a"
|
2021-03-11 13:12:34 +01:00
|
|
|
"-DTRACEFS_LIBRARY=${trace-cmd.lib}/lib/tracefs/libtracefs.a"
|
2019-04-28 12:56:20 +02:00
|
|
|
];
|
|
|
|
|
2019-07-25 22:13:17 +02:00
|
|
|
preInstall = ''
|
|
|
|
popd
|
2019-10-26 14:35:38 +02:00
|
|
|
make install_doc_gui prefix=$doc \
|
|
|
|
FIND_MANPAGE_DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl
|
2019-07-25 22:13:17 +02:00
|
|
|
pushd kernel-shark/build
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-04-28 12:56:20 +02:00
|
|
|
description = "GUI for trace-cmd which is an interface for the Linux kernel ftrace subsystem";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://kernelshark.org/";
|
2019-04-28 12:56:20 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
|
|
};
|
|
|
|
}
|