1{ lib, stdenv, fetchgit, pkg-config, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, coreutils }:
2
3stdenv.mkDerivation rec {
4 pname = "libtraceevent";
5 version = "1.6.2";
6
7 src = fetchgit {
8 url = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git";
9 rev = "libtraceevent-${version}";
10 sha256 = "sha256-iLy2rEKn0UJguRcY/W8RvUq7uX+snQojb/cXOmMsjwc=";
11 };
12
13 # Don't build and install html documentation
14 postPatch = ''
15 sed -i -e '/^all:/ s/html//' -e '/^install:/ s/install-html//' Documentation/Makefile
16 substituteInPlace scripts/utils.mk --replace /bin/pwd ${coreutils}/bin/pwd
17 '';
18
19 outputs = [ "out" "dev" "devman" ];
20 enableParallelBuilding = true;
21 nativeBuildInputs = [ pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl ];
22 makeFlags = [
23 "prefix=${placeholder "out"}"
24 "doc" # build docs
25 ];
26 installFlags = [
27 "pkgconfig_dir=${placeholder "out"}/lib/pkgconfig"
28 "doc-install"
29 ];
30
31 meta = with lib; {
32 description = "Linux kernel trace event library";
33 homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/";
34 license = licenses.lgpl21Only;
35 platforms = platforms.linux;
36 maintainers = with maintainers; [ wentasah ];
37 };
38}