@@ -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 ];