about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/libtracefs
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/libtracefs')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libtracefs/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/libtracefs/default.nix b/nixpkgs/pkgs/os-specific/linux/libtracefs/default.nix
new file mode 100644
index 000000000000..f3f1a393973d
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/libtracefs/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchgit, pkg-config, libtraceevent, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl }:
+
+stdenv.mkDerivation rec {
+  pname = "libtracefs";
+  version = "1.2.5";
+
+  src = fetchgit {
+    url = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git";
+    rev = "libtracefs-${version}";
+    sha256 = "1rva9ysspf1wqd0zf52qwgpaasrn7jcbns4dwldc59ksk0n93qdb";
+  };
+
+  # Don't build and install html documentation
+  postPatch = ''
+    sed -i -e '/^all:/ s/html//' -e '/^install:/ s/install-html//' Documentation/Makefile
+  '';
+
+  outputs = [ "out" "dev" "devman" ];
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl ];
+  buildInputs = [ libtraceevent ];
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+    "doc"                       # build docs
+  ];
+  installFlags = [
+    "pkgconfig_dir=${placeholder "out"}/lib/pkgconfig"
+    "install_doc"
+  ];
+
+  meta = with lib; {
+    description = "Linux kernel trace file system library";
+    homepage    = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/";
+    license     = licenses.lgpl21Only;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ wentasah ];
+  };
+}