Merge pull request #60367 from basvandijk/trace-cmd-and-kernelshark
kernelshark: init at 0.9.8 & trace-cmd: 2.6 -> 2.8.3
This commit is contained in:
commit
1ff227a979
@ -1,25 +1,40 @@
|
||||
{ stdenv, fetchgit, asciidoc, docbook_xsl, libxslt }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "trace-cmd-${version}";
|
||||
version = "2.6";
|
||||
version = "2.8.3";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git";
|
||||
rev = "refs/tags/trace-cmd-v${version}";
|
||||
sha256 = "15d6b7l766h2mamqgphx6l6a33b1zn0yar2h7i6b24ph6kz3idxn";
|
||||
};
|
||||
src = fetchgit (import ./src.nix);
|
||||
|
||||
buildInputs = [ asciidoc libxslt ];
|
||||
patches = [ ./fix-Makefiles.patch ];
|
||||
|
||||
nativeBuildInputs = [ asciidoc libxslt ];
|
||||
|
||||
outputs = [ "out" "lib" "dev" "man" ];
|
||||
|
||||
MANPAGE_DOCBOOK_XSL="${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl";
|
||||
|
||||
dontConfigure = true;
|
||||
buildPhase = "make prefix=$out MANPAGE_DOCBOOK_XSL=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl all doc";
|
||||
installPhase = "make prefix=$out install install_doc";
|
||||
|
||||
meta = {
|
||||
buildPhase = "make trace-cmd libs doc";
|
||||
|
||||
installTargets = [ "install_cmd" "install_libs" "install_man" ];
|
||||
installFlags = [
|
||||
"bindir=${placeholder "out"}/bin"
|
||||
"man_dir=${placeholder "man"}/share/man"
|
||||
"libdir=${placeholder "lib"}/lib"
|
||||
"includedir=${placeholder "dev"}/include/trace-cmd"
|
||||
"BASH_COMPLETE_DIR=${placeholder "out"}/etc/bash_completion.d"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mv $dev/include/trace-cmd/traceevent $dev/include/traceevent
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "User-space tools for the Linux kernel ftrace subsystem";
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||
homepage = http://kernelshark.org/;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ thoughtpolice basvandijk ];
|
||||
};
|
||||
}
|
||||
|
52
pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch
Normal file
52
pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch
Normal file
@ -0,0 +1,52 @@
|
||||
diff --git a/Documentation/Makefile b/Documentation/Makefile
|
||||
index 21e42fd..826361d 100644
|
||||
--- a/Documentation/Makefile
|
||||
+++ b/Documentation/Makefile
|
||||
@@ -108,7 +108,11 @@ $(IMGS_INSTALL): %.png.install : %.png force
|
||||
|
||||
GUI_INSTALL = $(HTML_INSTALL) $(IMGS_INSTALL)
|
||||
|
||||
-install: $(MAN1_INSTALL) $(MAN5_INSTALL) $(GUI_INSTALL)
|
||||
+install_man: $(MAN1_INSTALL) $(MAN5_INSTALL)
|
||||
+
|
||||
+install_gui: $(GUI_INSTALL)
|
||||
+
|
||||
+install: install_man install_gui
|
||||
|
||||
clean:
|
||||
(cd $(obj); \
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2bcc383..107ead0 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -289,7 +289,7 @@ libtraceevent.a: $(LIBTRACEEVENT_STATIC)
|
||||
libtracecmd.a: $(LIBTRACECMD_STATIC)
|
||||
libtracecmd.so: $(LIBTRACECMD_SHARED)
|
||||
|
||||
-libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED)
|
||||
+libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED) $(LIBTRACECMD_STATIC) $(LIBTRACEEVENT_STATIC)
|
||||
|
||||
plugins: force $(obj)/plugins/trace_plugin_dir $(obj)/plugins/trace_python_dir
|
||||
$(Q)$(MAKE) -C $(src)/plugins
|
||||
@@ -345,6 +345,8 @@ install_gui: install_cmd gui
|
||||
install_libs: libs
|
||||
$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
|
||||
$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ))
|
||||
+ $(Q)$(call do_install,$(LIBTRACECMD_STATIC),$(libdir_SQ))
|
||||
+ $(Q)$(call do_install,$(LIBTRACEEVENT_STATIC),$(libdir_SQ))
|
||||
$(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent)
|
||||
$(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent)
|
||||
$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ))
|
||||
@@ -356,6 +358,12 @@ doc:
|
||||
doc_clean:
|
||||
$(MAKE) -C $(src)/Documentation clean
|
||||
|
||||
+install_man:
|
||||
+ $(MAKE) -C $(src)/Documentation install_man
|
||||
+
|
||||
+install_gui_docs:
|
||||
+ $(MAKE) -C $(src)/Documentation install_gui
|
||||
+
|
||||
install_doc:
|
||||
$(MAKE) -C $(src)/Documentation install
|
||||
|
39
pkgs/os-specific/linux/trace-cmd/kernelshark.nix
Normal file
39
pkgs/os-specific/linux/trace-cmd/kernelshark.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ stdenv, mkDerivation, fetchgit, qtbase, cmake, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
|
||||
mkDerivation rec {
|
||||
pname = "kernelshark";
|
||||
version = "0.9.8";
|
||||
|
||||
src = fetchgit (import ./src.nix);
|
||||
|
||||
patches = [ ./fix-Makefiles.patch ];
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
preConfigure = "pushd kernel-shark";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ qtbase json_c mesa_glu freeglut pkg-config ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-D_INSTALL_PREFIX=${placeholder "out"}"
|
||||
"-DTRACECMD_BIN_DIR=${trace-cmd}/bin"
|
||||
"-DTRACECMD_INCLUDE_DIR=${trace-cmd.dev}/include"
|
||||
"-DTRACECMD_LIBRARY=${trace-cmd.lib}/lib/libtracecmd.a"
|
||||
"-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/libtraceevent.a"
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
popd
|
||||
make install_gui_docs prefix=$doc
|
||||
pushd kernel-shark/build
|
||||
'';
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
5
pkgs/os-specific/linux/trace-cmd/src.nix
Normal file
5
pkgs/os-specific/linux/trace-cmd/src.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
url = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
|
||||
rev = "138c70106835ee0f05879e7f2f46bca8dae7ca99"; # branch: trace-cmd-stable-v2.8
|
||||
sha256 = "1grpip7lywf98nsm7ql1d6bgc0ky0672savr8jz3a8hf9ny265nx";
|
||||
}
|
@ -6399,6 +6399,8 @@ in
|
||||
|
||||
trace-cmd = callPackage ../os-specific/linux/trace-cmd { };
|
||||
|
||||
kernelshark = libsForQt5.callPackage ../os-specific/linux/trace-cmd/kernelshark.nix { };
|
||||
|
||||
traceroute = callPackage ../tools/networking/traceroute { };
|
||||
|
||||
tracebox = callPackage ../tools/networking/tracebox { };
|
||||
|
Loading…
x
Reference in New Issue
Block a user