python311Packages.babeltrace: init at 1.5.11

This commit is contained in:
hacker1024 2024-02-02 13:05:16 +11:00 committed by Doron Behar
parent cd8f5fcd28
commit e09452b585
2 changed files with 37 additions and 15 deletions

View File

@ -9,6 +9,9 @@
libuuid, libuuid,
popt, popt,
elfutils, elfutils,
enablePython ? false,
pythonPackages ? null,
swig2,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -20,7 +23,8 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "Z7Q6qu9clR+nrxpVfPcgGhH+iYdrfCK6CgPLwxbbWpw="; sha256 = "Z7Q6qu9clR+nrxpVfPcgGhH+iYdrfCK6CgPLwxbbWpw=";
}; };
nativeBuildInputs = [ nativeBuildInputs =
[
# The pre-generated ./configure script uses an old autoconf version which # The pre-generated ./configure script uses an old autoconf version which
# breaks cross-compilation (replaces references to malloc with rpl_malloc). # breaks cross-compilation (replaces references to malloc with rpl_malloc).
# Re-generate with nixpkgs's autoconf. This requires glib to be present in # Re-generate with nixpkgs's autoconf. This requires glib to be present in
@ -28,6 +32,10 @@ stdenv.mkDerivation (finalAttrs: {
autoreconfHook autoreconfHook
glib glib
pkg-config pkg-config
]
++ lib.optionals enablePython [
swig2
pythonPackages.setuptools
]; ];
buildInputs = [ buildInputs = [
glib glib
@ -36,12 +44,21 @@ stdenv.mkDerivation (finalAttrs: {
elfutils elfutils
]; ];
configureFlags = [ configureFlags =
[
# --enable-debug-info (default) requires the configure script to run host # --enable-debug-info (default) requires the configure script to run host
# executables to determine the elfutils library version, which cannot be done # executables to determine the elfutils library version, which cannot be done
# while cross compiling. # while cross compiling.
(lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "debug-info") (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "debug-info")
]
++ lib.optionals enablePython [
# Using (lib.enableFeature enablePython "python-bindings") makes the
# configure script look for python dependencies even when
# enablePython==false. Adding the configure flag conditionally seems to
# solve this.
"--enable-python-bindings"
]; ];
#
passthru.updateScript = gitUpdater { passthru.updateScript = gitUpdater {
url = "https://git.efficios.com/babeltrace.git"; url = "https://git.efficios.com/babeltrace.git";

View File

@ -1330,6 +1330,11 @@ self: super: with self; {
babelgladeextractor = callPackage ../development/python-modules/babelgladeextractor { }; babelgladeextractor = callPackage ../development/python-modules/babelgladeextractor { };
babeltrace = toPythonModule (pkgs.babeltrace.override {
pythonPackages = self;
enablePython = true;
});
bambi = callPackage ../development/python-modules/bambi { }; bambi = callPackage ../development/python-modules/bambi { };
pad4pi = callPackage ../development/python-modules/pad4pi { }; pad4pi = callPackage ../development/python-modules/pad4pi { };