Merge pull request #137584 from wentasah/kernelshark
kernelshark: 1.2 → 2.0.1 (and related updates: trace-cmd, ...)
This commit is contained in:
commit
477e740ce5
@ -12077,6 +12077,12 @@
|
||||
fingerprint = "2145 955E 3F5E 0C95 3458 41B5 11F7 BAEA 8567 43FF";
|
||||
}];
|
||||
};
|
||||
wentasah = {
|
||||
name = "Michal Sojka";
|
||||
email = "wsh@2x.cz";
|
||||
github = "wentasah";
|
||||
githubId = 140542;
|
||||
};
|
||||
wheelsandmetal = {
|
||||
email = "jakob@schmutz.co.uk";
|
||||
github = "wheelsandmetal";
|
||||
|
37
pkgs/os-specific/linux/libtraceevent/default.nix
Normal file
37
pkgs/os-specific/linux/libtraceevent/default.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ lib, stdenv, fetchgit, pkg-config, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libtraceevent";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git";
|
||||
rev = "libtraceevent-${version}";
|
||||
sha256 = "1x36qsrcssjywjpwkgyp9hz6y878kivma9pz7zrhxdsrqv2d2zs1";
|
||||
};
|
||||
|
||||
# Don't build and install html documentation
|
||||
postPatch = ''
|
||||
sed -i -e '/^all:/ s/html//' -e '/^install:/ s/install-html//' Documentation/Makefile
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "devman" ];
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = [ pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl ];
|
||||
makeFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
"doc" # build docs
|
||||
];
|
||||
installFlags = [
|
||||
"pkgconfig_dir=${placeholder "out"}/lib/pkgconfig"
|
||||
"doc-install"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux kernel trace event library";
|
||||
homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/";
|
||||
license = licenses.lgpl21Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ wentasah ];
|
||||
};
|
||||
}
|
38
pkgs/os-specific/linux/libtracefs/default.nix
Normal file
38
pkgs/os-specific/linux/libtracefs/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ lib, stdenv, fetchgit, pkg-config, libtraceevent, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libtracefs";
|
||||
version = "1.2.5";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git";
|
||||
rev = "libtracefs-${version}";
|
||||
sha256 = "1rva9ysspf1wqd0zf52qwgpaasrn7jcbns4dwldc59ksk0n93qdb";
|
||||
};
|
||||
|
||||
# Don't build and install html documentation
|
||||
postPatch = ''
|
||||
sed -i -e '/^all:/ s/html//' -e '/^install:/ s/install-html//' Documentation/Makefile
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "devman" ];
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = [ pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl ];
|
||||
buildInputs = [ libtraceevent ];
|
||||
makeFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
"doc" # build docs
|
||||
];
|
||||
installFlags = [
|
||||
"pkgconfig_dir=${placeholder "out"}/lib/pkgconfig"
|
||||
"install_doc"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux kernel trace file system library";
|
||||
homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/";
|
||||
license = licenses.lgpl21Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ wentasah ];
|
||||
};
|
||||
}
|
@ -1,17 +1,23 @@
|
||||
{ lib, stdenv, fetchgit, asciidoc, docbook_xsl, libxslt }:
|
||||
{ lib, stdenv, fetchgit, pkg-config, asciidoc, xmlto, docbook_xsl, libxslt, libtraceevent, libtracefs }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "trace-cmd";
|
||||
version = "2.9.1";
|
||||
version = "2.9.5";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
|
||||
rev = "trace-cmd-v${version}";
|
||||
sha256 = "19c63a0qmcppm1456qf4k6a0d1agcvpa6jnbzrdcyc520yax6khw";
|
||||
sha256 = "0kc5cldk5i7q2zr2nyz3mvs5v7w0km6lpx7g39sy3pmhshp0wqlq";
|
||||
};
|
||||
|
||||
patches = [ ./fix-Makefiles.patch ];
|
||||
# Don't build and install html documentation
|
||||
postPatch = ''
|
||||
sed -i -e '/^all:/ s/html//' -e '/^install:/ s/install-html//' \
|
||||
Documentation{,/trace-cmd,/libtracecmd}/Makefile
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ asciidoc libxslt ];
|
||||
nativeBuildInputs = [ asciidoc libxslt pkg-config xmlto ];
|
||||
|
||||
buildInputs = [ libtraceevent libtracefs ];
|
||||
|
||||
outputs = [ "out" "lib" "dev" "man" ];
|
||||
|
||||
@ -19,20 +25,28 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = "make trace-cmd libs doc";
|
||||
enableParallelBuilding = true;
|
||||
makeFlags = [
|
||||
"all" "libs" "doc"
|
||||
# The following values appear in the generated .pc file
|
||||
"prefix=${placeholder "lib"}"
|
||||
"libdir=${placeholder "lib"}/lib"
|
||||
"includedir=${placeholder "dev"}/include"
|
||||
];
|
||||
|
||||
installTargets = [ "install_cmd" "install_libs" "install_doc" ];
|
||||
installFlags = [
|
||||
"bindir=${placeholder "out"}/bin"
|
||||
"man_dir=${placeholder "man"}/share/man"
|
||||
"libdir=${placeholder "lib"}/lib"
|
||||
"pkgconfig_dir=${placeholder "lib"}/lib/pkgconfig"
|
||||
"includedir=${placeholder "dev"}/include"
|
||||
"BASH_COMPLETE_DIR=${placeholder "out"}/share/bash-completion/completions"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "User-space tools for the Linux kernel ftrace subsystem";
|
||||
homepage = "https://kernelshark.org/";
|
||||
homepage = "https://www.trace-cmd.org/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ thoughtpolice basvandijk ];
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b034042..b8a06bc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -338,6 +338,7 @@ libtracefs.a: $(LIBTRACEFS_STATIC)
|
||||
libtracefs.so: $(LIBTRACEFS_SHARED)
|
||||
|
||||
libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED) $(LIBTRACEFS_SHARED)
|
||||
+libs: $(LIBTRACECMD_STATIC) $(LIBTRACEEVENT_STATIC) $(LIBTRACEFS_STATIC)
|
||||
|
||||
test: force $(LIBTRACEEVENT_STATIC) $(LIBTRACEFS_STATIC) $(LIBTRACECMD_STATIC)
|
||||
ifneq ($(CUNIT_INSTALLED),1)
|
||||
@@ -414,6 +415,9 @@ install_libs: libs
|
||||
$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
|
||||
$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)/traceevent)
|
||||
$(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)/tracefs)
|
||||
+ $(Q)$(call do_install,$(LIBTRACECMD_STATIC),$(libdir_SQ)/trace-cmd)
|
||||
+ $(Q)$(call do_install,$(LIBTRACEEVENT_STATIC),$(libdir_SQ)/traceevent)
|
||||
+ $(Q)$(call do_install,$(LIBTRACEFS_STATIC),$(libdir_SQ)/tracefs)
|
||||
$(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)/trace-cmd)
|
||||
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||
index 457c100..687e150 100644
|
||||
--- a/kernel-shark/src/CMakeLists.txt
|
||||
+++ b/kernel-shark/src/CMakeLists.txt
|
||||
@@ -92,7 +92,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
|
||||
DESTINATION ${_INSTALL_PREFIX}/share/icons/${KS_APP_NAME})
|
||||
|
||||
install(FILES "${KS_DIR}/org.freedesktop.kshark-record.policy"
|
||||
- DESTINATION /usr/share/polkit-1/actions/)
|
||||
+ DESTINATION ${_INSTALL_PREFIX}/share/polkit-1/actions/)
|
||||
|
||||
install(PROGRAMS "${KS_DIR}/bin/kshark-su-record"
|
||||
DESTINATION ${_INSTALL_PREFIX}/bin/)
|
@ -1,40 +1,31 @@
|
||||
{ lib, mkDerivation, fetchgit, qtbase, cmake, asciidoc, docbook_xsl, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
|
||||
{ lib, mkDerivation, fetchgit, qtbase, cmake, asciidoc
|
||||
, docbook_xsl, json_c, mesa_glu, freeglut, trace-cmd, pkg-config
|
||||
, libtraceevent, libtracefs, freefont_ttf
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "kernelshark";
|
||||
version = "1.2";
|
||||
version = "2.0.2";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
|
||||
rev = "kernelshark-v${version}";
|
||||
sha256 = "0wzzm2imk9n94v96v6sbvbff6j47lz4qj0snhiyv3nj3slg0anvh";
|
||||
url = "https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/";
|
||||
rev = "kernelshark-v${version}";
|
||||
sha256 = "0vy5wa1kccrxr973l870jy5hl6lac7sk3zyg3hxrwmivin1yf0cv";
|
||||
};
|
||||
|
||||
patches = [ ./fix-Makefiles.patch ];
|
||||
outputs = [ "out" ];
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
|
||||
preConfigure = "pushd kernel-shark";
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake asciidoc ];
|
||||
|
||||
buildInputs = [ qtbase json_c mesa_glu freeglut ];
|
||||
buildInputs = [ qtbase json_c mesa_glu freeglut libtraceevent libtracefs trace-cmd ];
|
||||
|
||||
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/trace-cmd/libtracecmd.a"
|
||||
"-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/traceevent/libtraceevent.a"
|
||||
"-DTRACEFS_LIBRARY=${trace-cmd.lib}/lib/tracefs/libtracefs.a"
|
||||
"-D_POLKIT_INSTALL_PREFIX=${placeholder "out"}"
|
||||
"-DPKG_CONGIG_DIR=${placeholder "out"}/lib/pkgconfig"
|
||||
"-DTT_FONT_FILE=${freefont_ttf}/share/fonts/truetype/FreeSans.ttf"
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
popd
|
||||
make install_doc_gui prefix=$doc \
|
||||
FIND_MANPAGE_DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl
|
||||
pushd kernel-shark/build
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GUI for trace-cmd which is an interface for the Linux kernel ftrace subsystem";
|
||||
homepage = "https://kernelshark.org/";
|
||||
|
@ -21867,6 +21867,10 @@ with pkgs;
|
||||
|
||||
libnl = callPackage ../os-specific/linux/libnl { };
|
||||
|
||||
libtraceevent = callPackage ../os-specific/linux/libtraceevent {};
|
||||
|
||||
libtracefs = callPackage ../os-specific/linux/libtracefs {};
|
||||
|
||||
lieer = callPackage ../applications/networking/lieer {};
|
||||
|
||||
linuxConsoleTools = callPackage ../os-specific/linux/consoletools { };
|
||||
|
Loading…
Reference in New Issue
Block a user