mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
trace-cmd: 2.9.1 -> 2.9.5
Besides updating trace-cmd, this commit also switches from bundled libtraceevent and libtracefs to their external sources. Upstream copied those libraries to separate repositories (see https://lore.kernel.org/linux-trace-devel/20210325172357.6e059c31@gandalf.local.home/). Another change relates to documentation building, which upstream reworked. We disable HTML documentation - previous versions did not provide it too. Finally, we enable parallel build, which is simpler if `buildPhase` is not overridden.
This commit is contained in:
parent
b068cd2e14
commit
3d249d1d49
@ -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/)
|
Loading…
Reference in New Issue
Block a user