From 9e9dac32f7b17997d3a3f53f7a3375ef965c271f Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 16 Jun 2023 23:39:09 +0200 Subject: [PATCH] libtracefs: switch to meson build system Changes/benefits: - Simpler to package - sqlhist tool is built - Test are run during package build --- pkgs/os-specific/linux/libtracefs/default.nix | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/pkgs/os-specific/linux/libtracefs/default.nix b/pkgs/os-specific/linux/libtracefs/default.nix index 8c6eb2ad14c6..3e9c9115645d 100644 --- a/pkgs/os-specific/linux/libtracefs/default.nix +++ b/pkgs/os-specific/linux/libtracefs/default.nix @@ -8,9 +8,13 @@ , docbook_xml_dtd_45 , docbook_xsl , coreutils -, which , valgrind , sourceHighlight +, meson +, flex +, bison +, ninja +, cunit }: stdenv.mkDerivation rec { @@ -24,22 +28,30 @@ stdenv.mkDerivation rec { }; postPatch = '' - substituteInPlace scripts/utils.mk --replace /bin/pwd ${coreutils}/bin/pwd - patchShebangs --build check-manpages.sh + chmod +x samples/extract-example.sh + patchShebangs --build check-manpages.sh samples/extract-example.sh Documentation/install-docs.sh.in ''; outputs = [ "out" "dev" "devman" "doc" ]; - enableParallelBuilding = true; - nativeBuildInputs = [ pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl which valgrind sourceHighlight ]; + nativeBuildInputs = [ + meson + ninja + pkg-config + asciidoc + xmlto + docbook_xml_dtd_45 + docbook_xsl + valgrind + sourceHighlight + flex + bison + ]; buildInputs = [ libtraceevent ]; - makeFlags = [ - "prefix=${placeholder "out"}" - "doc" # build docs - ]; - installFlags = [ - "pkgconfig_dir=${placeholder "out"}/lib/pkgconfig" - "install_doc" - ]; + + ninjaFlags = [ "all" "docs" ]; + + doCheck = true; + checkInputs = [ cunit ]; meta = with lib; { description = "Linux kernel trace file system library";