1{ lib
2, stdenv
3, fetchgit
4, pkg-config
5, libtraceevent
6, asciidoc
7, xmlto
8, docbook_xml_dtd_45
9, docbook_xsl
10, coreutils
11, which
12, valgrind
13, sourceHighlight
14}:
15
16stdenv.mkDerivation rec {
17 pname = "libtracefs";
18 version = "1.5.0";
19
20 src = fetchgit {
21 url = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git";
22 rev = "libtracefs-${version}";
23 sha256 = "sha256-5OUTOIla4adtSJwQkii6f/mB99R5QzodyQkq/g6oNSw=";
24 };
25
26 postPatch = ''
27 substituteInPlace scripts/utils.mk --replace /bin/pwd ${coreutils}/bin/pwd
28 patchShebangs check-manpages.sh
29 '';
30
31 outputs = [ "out" "dev" "devman" "doc" ];
32 enableParallelBuilding = true;
33 nativeBuildInputs = [ pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl which valgrind sourceHighlight ];
34 buildInputs = [ libtraceevent ];
35 makeFlags = [
36 "prefix=${placeholder "out"}"
37 "doc" # build docs
38 ];
39 installFlags = [
40 "pkgconfig_dir=${placeholder "out"}/lib/pkgconfig"
41 "install_doc"
42 ];
43
44 meta = with lib; {
45 description = "Linux kernel trace file system library";
46 homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/";
47 license = licenses.lgpl21Only;
48 platforms = platforms.linux;
49 maintainers = with maintainers; [ wentasah ];
50 };
51}