2019-10-26 12:35:38 +00:00
|
|
|
{ stdenv, mkDerivation, fetchgit, qtbase, cmake, asciidoc, docbook_xsl, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
|
2019-08-13 21:52:01 +00:00
|
|
|
mkDerivation {
|
2019-04-28 10:56:20 +00:00
|
|
|
pname = "kernelshark";
|
2019-10-26 12:35:38 +00:00
|
|
|
version = "1.1.0";
|
2019-04-28 10:56:20 +00:00
|
|
|
|
2019-07-27 18:02:58 +00:00
|
|
|
src = fetchgit (import ./src.nix);
|
2019-04-28 10:56:20 +00:00
|
|
|
|
2019-07-25 20:13:17 +00:00
|
|
|
patches = [ ./fix-Makefiles.patch ];
|
|
|
|
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
preConfigure = "pushd kernel-shark";
|
2019-04-28 10:56:20 +00:00
|
|
|
|
2019-10-26 12:35:38 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake asciidoc ];
|
2019-04-28 10:56:20 +00:00
|
|
|
|
2019-10-26 12:35:38 +00:00
|
|
|
buildInputs = [ qtbase json_c mesa_glu freeglut ];
|
2019-04-28 10:56:20 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-D_INSTALL_PREFIX=${placeholder "out"}"
|
2019-07-27 18:19:08 +00:00
|
|
|
"-DTRACECMD_BIN_DIR=${trace-cmd}/bin"
|
2019-07-25 19:30:46 +00:00
|
|
|
"-DTRACECMD_INCLUDE_DIR=${trace-cmd.dev}/include"
|
2019-10-26 12:35:38 +00:00
|
|
|
"-DTRACECMD_LIBRARY=${trace-cmd.lib}/lib/trace-cmd/libtracecmd.a"
|
|
|
|
"-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/traceevent/libtraceevent.a"
|
2019-04-28 10:56:20 +00:00
|
|
|
];
|
|
|
|
|
2019-07-25 20:13:17 +00:00
|
|
|
preInstall = ''
|
|
|
|
popd
|
2019-10-26 12:35:38 +00:00
|
|
|
make install_doc_gui prefix=$doc \
|
|
|
|
FIND_MANPAGE_DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl
|
2019-07-25 20:13:17 +00:00
|
|
|
pushd kernel-shark/build
|
|
|
|
'';
|
|
|
|
|
2019-04-28 10:56:20 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GUI for trace-cmd which is an interface for the Linux kernel ftrace subsystem";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://kernelshark.org/";
|
2019-04-28 10:56:20 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ basvandijk ];
|
|
|
|
};
|
|
|
|
}
|