1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/os-specific/linux/trace-cmd/kernelshark.nix
Michal Sojka 136ae024c0 trace-cmd: 2.9-dev -> 2.9.1, kernelshark: 1.1.0 -> 1.2
Besides updating the version, this commit decouples trace-cmd and
kernelshark source revisions. These two programs are developed in the
same repository but are released independently. Nixpkgs built the
previous versions of these programs from the same source commit, which
meant that at least one of the programs were not built from the
officially released version. Now we use the release tags of the
corresponding programs.
2021-03-22 11:00:26 +01:00

46 lines
1.4 KiB
Nix

{ lib, mkDerivation, fetchgit, qtbase, cmake, asciidoc, docbook_xsl, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
mkDerivation rec {
pname = "kernelshark";
version = "1.2";
src = fetchgit {
url = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
rev = "kernelshark-v${version}";
sha256 = "0wzzm2imk9n94v96v6sbvbff6j47lz4qj0snhiyv3nj3slg0anvh";
};
patches = [ ./fix-Makefiles.patch ];
outputs = [ "out" "doc" ];
preConfigure = "pushd kernel-shark";
nativeBuildInputs = [ pkg-config cmake asciidoc ];
buildInputs = [ qtbase json_c mesa_glu freeglut ];
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"
];
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/";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ basvandijk ];
};
}