1{ lib
2, stdenv
3, fetchzip
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 = fetchzip {
25 url = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-libtracefs-${version}.tar.gz";
26 hash = "sha256-64eXFFdnZHHf4C3vbADtPuIMsfJ85VZ6t8A1gIc1CW0=";
27 };
28
29 postPatch = ''
30 chmod +x samples/extract-example.sh
31 patchShebangs --build check-manpages.sh samples/extract-example.sh Documentation/install-docs.sh.in
32 '';
33
34 outputs = [ "out" "dev" "devman" "doc" ];
35 nativeBuildInputs = [
36 meson
37 ninja
38 pkg-config
39 asciidoc
40 xmlto
41 docbook_xml_dtd_45
42 docbook_xsl
43 valgrind
44 sourceHighlight
45 flex
46 bison
47 ];
48 buildInputs = [ libtraceevent ];
49
50 ninjaFlags = [ "all" "docs" ];
51
52 doCheck = true;
53 checkInputs = [ cunit ];
54
55 meta = with lib; {
56 description = "Linux kernel trace file system library";
57 mainProgram = "sqlhist";
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}