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, valgrind
12, sourceHighlight
13, meson
14, flex
15, bison
16, ninja
17, cunit
18}:
19
20stdenv.mkDerivation rec {
21 pname = "libtracefs";
22 version = "1.7.0";
23
24 src = fetchgit {
25 url = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git";
26 rev = "libtracefs-${version}";
27 sha256 = "sha256-64eXFFdnZHHf4C3vbADtPuIMsfJ85VZ6t8A1gIc1CW0=";
28 };
29
30 postPatch = ''
31 chmod +x samples/extract-example.sh
32 patchShebangs --build check-manpages.sh samples/extract-example.sh Documentation/install-docs.sh.in
33 '';
34
35 outputs = [ "out" "dev" "devman" "doc" ];
36 nativeBuildInputs = [
37 meson
38 ninja
39 pkg-config
40 asciidoc
41 xmlto
42 docbook_xml_dtd_45
43 docbook_xsl
44 valgrind
45 sourceHighlight
46 flex
47 bison
48 ];
49 buildInputs = [ libtraceevent ];
50
51 ninjaFlags = [ "all" "docs" ];
52
53 doCheck = true;
54 checkInputs = [ cunit ];
55
56 meta = with lib; {
57 description = "Linux kernel trace file system library";
58 homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/";
59 license = licenses.lgpl21Only;
60 platforms = platforms.linux;
61 maintainers = with maintainers; [ wentasah ];
62 };
63}