mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
babeltrace: reformat with nixfmt-rfc-style
- Don't use `meta = with lib;`. - Use (finalAttrs:{}) pattern. - Use lib.enableFeature for debug-info ./configure flag. - Use pkgs/by-name
This commit is contained in:
parent
e9ee548d90
commit
0d7dc9e3fe
52
pkgs/by-name/ba/babeltrace/package.nix
Normal file
52
pkgs/by-name/ba/babeltrace/package.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoreconfHook,
|
||||
pkg-config,
|
||||
glib,
|
||||
libuuid,
|
||||
popt,
|
||||
elfutils,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "babeltrace";
|
||||
version = "1.5.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.efficios.com/files/babeltrace/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
|
||||
sha256 = "1hkg3phnamxfrhwzmiiirbhdgckzfkqwhajl0lmr1wfps7j47wcz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
# The pre-generated ./configure script uses an old autoconf version which
|
||||
# breaks cross-compilation (replaces references to malloc with rpl_malloc).
|
||||
# Re-generate with nixpkgs's autoconf. This requires glib to be present in
|
||||
# nativeBuildInputs for its m4 macros to be present.
|
||||
autoreconfHook
|
||||
glib
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
glib
|
||||
libuuid
|
||||
popt
|
||||
elfutils
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
# --enable-debug-info (default) requires the configure script to run host
|
||||
# executables to determine the elfutils library version, which cannot be done
|
||||
# while cross compiling.
|
||||
(lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "debug-info")
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Command-line tool and library to read and convert LTTng tracefiles";
|
||||
homepage = "https://www.efficios.com/babeltrace";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ bjornfor ];
|
||||
};
|
||||
})
|
@ -1,32 +0,0 @@
|
||||
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, glib, libuuid, popt, elfutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "babeltrace";
|
||||
version = "1.5.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.efficios.com/files/babeltrace/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1hkg3phnamxfrhwzmiiirbhdgckzfkqwhajl0lmr1wfps7j47wcz";
|
||||
};
|
||||
|
||||
# The pre-generated ./configure script uses an old autoconf version which
|
||||
# breaks cross-compilation (replaces references to malloc with rpl_malloc).
|
||||
# Re-generate with nixpkgs's autoconf. This requires glib to be present in
|
||||
# nativeBuildInputs for its m4 macros to be present.
|
||||
nativeBuildInputs = [ autoreconfHook glib pkg-config ];
|
||||
buildInputs = [ glib libuuid popt elfutils ];
|
||||
|
||||
# --enable-debug-info (default) requires the configure script to run host
|
||||
# executables to determine the elfutils library version, which cannot be done
|
||||
# while cross compiling.
|
||||
configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-debug-info";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line tool and library to read and convert LTTng tracefiles";
|
||||
homepage = "https://www.efficios.com/babeltrace";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
|
||||
}
|
@ -18033,8 +18033,6 @@ with pkgs;
|
||||
|
||||
b4 = callPackage ../development/tools/b4 { };
|
||||
|
||||
babeltrace = callPackage ../development/tools/misc/babeltrace { };
|
||||
|
||||
bam = callPackage ../development/tools/build-managers/bam { };
|
||||
|
||||
bandit = with python3Packages; toPythonApplication bandit;
|
||||
|
Loading…
Reference in New Issue
Block a user