git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit3d249d1d49c6eb35d14f812ee40a6cbb6b8aa7b3 authorMichal Sojka <michal.sojka@cvut.cz> dateSun 12 Sep 2021, 20:28 (5 years ago) parentb068cd2
2 files changed+21−42
pkgs/os-specific/linux/trace-cmd/default.nix+21−7 pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch−35
pkgs/os-specific/linux/trace-cmd/default.nix+21−7
@@ -1,17 +1,23 @@
1−{ lib, stdenv, fetchgit, asciidoc, docbook_xsl, libxslt }:
1+{ lib, stdenv, fetchgit, pkg-config, asciidoc, xmlto, docbook_xsl, libxslt, libtraceevent, libtracefs }:
22stdenv.mkDerivation rec {
33 pname = "trace-cmd";
4− version = "2.9.1";
4+ version = "2.9.5";
55
66 src = fetchgit {
77 url = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
88 rev = "trace-cmd-v${version}";
9− sha256 = "19c63a0qmcppm1456qf4k6a0d1agcvpa6jnbzrdcyc520yax6khw";
9+ sha256 = "0kc5cldk5i7q2zr2nyz3mvs5v7w0km6lpx7g39sy3pmhshp0wqlq";
1010 };
1111
12− patches = [ ./fix-Makefiles.patch ];
12+ # Don't build and install html documentation
13+ postPatch = ''
14+ sed -i -e '/^all:/ s/html//' -e '/^install:/ s/install-html//' \
15+ Documentation{,/trace-cmd,/libtracecmd}/Makefile
16+ '';
1317
14− nativeBuildInputs = [ asciidoc libxslt ];
18+ nativeBuildInputs = [ asciidoc libxslt pkg-config xmlto ];
19+
20+ buildInputs = [ libtraceevent libtracefs ];
1521
1622 outputs = [ "out" "lib" "dev" "man" ];
1723
@@ -19,20 +25,28 @@ stdenv.mkDerivation rec {
1925
2026 dontConfigure = true;
2127
22− buildPhase = "make trace-cmd libs doc";
28+ enableParallelBuilding = true;
29+ makeFlags = [
30+ "all" "libs" "doc"
31+ # The following values appear in the generated .pc file
32+ "prefix=${placeholder "lib"}"
33+ "libdir=${placeholder "lib"}/lib"
34+ "includedir=${placeholder "dev"}/include"
35+ ];
2336
2437 installTargets = [ "install_cmd" "install_libs" "install_doc" ];
2538 installFlags = [
2639 "bindir=${placeholder "out"}/bin"
2740 "man_dir=${placeholder "man"}/share/man"
2841 "libdir=${placeholder "lib"}/lib"
42+ "pkgconfig_dir=${placeholder "lib"}/lib/pkgconfig"
2943 "includedir=${placeholder "dev"}/include"
3044 "BASH_COMPLETE_DIR=${placeholder "out"}/share/bash-completion/completions"
3145 ];
3246
3347 meta = with lib; {
3448 description = "User-space tools for the Linux kernel ftrace subsystem";
35− homepage = "https://kernelshark.org/";
49+ homepage = "https://www.trace-cmd.org/";
3650 license = licenses.gpl2;
3751 platforms = platforms.linux;
3852 maintainers = with maintainers; [ thoughtpolice basvandijk ];
pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patchdeleted−35
@@ -1,35 +0,0 @@
1−diff --git a/Makefile b/Makefile
2−index b034042..b8a06bc 100644
3−--- a/Makefile
4−+++ b/Makefile
5−@@ -338,6 +338,7 @@ libtracefs.a: $(LIBTRACEFS_STATIC)
6− libtracefs.so: $(LIBTRACEFS_SHARED)
7−
8− libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED) $(LIBTRACEFS_SHARED)
9−+libs: $(LIBTRACECMD_STATIC) $(LIBTRACEEVENT_STATIC) $(LIBTRACEFS_STATIC)
10−
11− test: force $(LIBTRACEEVENT_STATIC) $(LIBTRACEFS_STATIC) $(LIBTRACECMD_STATIC)
12− ifneq ($(CUNIT_INSTALLED),1)
13−@@ -414,6 +415,9 @@ install_libs: libs
14− $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
15− $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)/traceevent)
16− $(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)/tracefs)
17−+ $(Q)$(call do_install,$(LIBTRACECMD_STATIC),$(libdir_SQ)/trace-cmd)
18−+ $(Q)$(call do_install,$(LIBTRACEEVENT_STATIC),$(libdir_SQ)/traceevent)
19−+ $(Q)$(call do_install,$(LIBTRACEFS_STATIC),$(libdir_SQ)/tracefs)
20− $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent)
21− $(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent)
22− $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
23−diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
24−index 457c100..687e150 100644
25−--- a/kernel-shark/src/CMakeLists.txt
26−+++ b/kernel-shark/src/CMakeLists.txt
27−@@ -92,7 +92,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
28− DESTINATION ${_INSTALL_PREFIX}/share/icons/${KS_APP_NAME})
29−
30− install(FILES "${KS_DIR}/org.freedesktop.kshark-record.policy"
31−- DESTINATION /usr/share/polkit-1/actions/)
32−+ DESTINATION ${_INSTALL_PREFIX}/share/polkit-1/actions/)
33−
34− install(PROGRAMS "${KS_DIR}/bin/kshark-su-record"
35− DESTINATION ${_INSTALL_PREFIX}/bin/)