default.nix (1458B)
1 # https://raw.githubusercontent.com/NixOS/nixpkgs/nixos-24.05/pkgs/development/tools/misc/babeltrace/default.nix 2 3 let 4 pkgs = import <nixpkgs> { }; 5 in 6 pkgs.stdenv.mkDerivation rec { 7 pname = "babeltrace2"; 8 version = "2.0.6"; 9 10 src = pkgs.fetchurl { 11 url = "https://www.efficios.com/files/babeltrace/${pname}-${version}.tar.bz2"; 12 sha256 = "1jajxjlj7p25j2awjlnddxayp6ac4c3cfb7kj5dhppj2wrspw750"; 13 }; 14 15 # The pre-generated ./configure script uses an old autoconf version which 16 # breaks cross-compilation (replaces references to malloc with rpl_malloc). 17 # Re-generate with nixpkgs's autoconf. This requires glib to be present in 18 # nativeBuildInputs for its m4 macros to be present. 19 nativeBuildInputs = with pkgs; [ autoreconfHook glib pkg-config ]; 20 buildInputs = with pkgs; [ glib libuuid popt elfutils ]; 21 22 # --enable-debug-info (default) requires the configure script to run host 23 # executables to determine the elfutils library version, which cannot be done 24 # while cross compiling. 25 configureFlags = pkgs.lib.optional (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) "--disable-debug-info"; 26 27 meta = with pkgs.lib; { 28 description = "Command-line tool and library to read and convert LTTng tracefiles"; 29 homepage = "https://www.efficios.com/babeltrace"; 30 license = licenses.mit; 31 platforms = platforms.linux; 32 maintainers = [ maintainers.bjornfor ]; 33 }; 34 }