summary refs log tree commit diff
path: root/pkgs/os-specific/linux/trace-cmd/default.nix
blob: 5ec5fbb7c2294303bdb8425723489e84c431b72a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ stdenv, fetchgit, asciidoc, docbook_xsl, libxslt }:
stdenv.mkDerivation {
  pname = "trace-cmd";
  version = "2.9-dev";

  src = fetchgit (import ./src.nix);

  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 trace-cmd libs doc";

  installTargets = [ "install_cmd" "install_libs" "install_doc" ];
  installFlags = [
    "bindir=${placeholder "out"}/bin"
    "man_dir=${placeholder "man"}/share/man"
    "libdir=${placeholder "lib"}/lib"
    "includedir=${placeholder "dev"}/include"
    "BASH_COMPLETE_DIR=${placeholder "out"}/etc/bash_completion.d"
  ];

  meta = with stdenv.lib; {
    description = "User-space tools for the Linux kernel ftrace subsystem";
    homepage    = https://kernelshark.org/;
    license     = licenses.gpl2;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ thoughtpolice basvandijk ];
  };
}