18 pythonPackages ? null,
20 ensureNewerSourcesForZipFilesHook,
23 stdenv.mkDerivation rec {
24 pname = "babeltrace2";
27 src = fetchFromGitHub {
31 hash = "sha256-L4YTqPxvWynUBnmAQnlJ2RNbEv9MhBxQOsqbWix8ZwU=";
35 # Patches needed for Python 3.12
37 # python: Use standalone 'sysconfig' module
38 url = "https://github.com/efficios/babeltrace/commit/452480eb6820df9973d50431a479ca547815ae08.patch";
39 hash = "sha256-YgUKHJzdliNUsTY29E0xxcUjqVWn4EvxyTs0B+O+jrI=";
42 # python: replace distutils with setuptools
43 url = "https://github.com/efficios/babeltrace/commit/6ec97181a525a3cd64cedbcd0df905ed9e84ba03.patch";
44 hash = "sha256-1hlEkPcRUpf2+iEXqHXcCDOaLTg+eaVcahqZlA8m5QY=";
47 # fix: python: monkey patch the proper sysconfig implementation
48 url = "https://github.com/efficios/babeltrace/commit/927263e4ea62877af7240cfdb1514ae949dbfc2e.patch";
49 hash = "sha256-HNRQ7uw26FUKCQ/my6//OL2xsHdOGlQUq5zIKtg9OGw=";
71 ++ lib.optionals enablePython [
73 pythonPackages.setuptools
74 ensureNewerSourcesForZipFilesHook
80 ] ++ lib.optional enablePython python;
83 (lib.enableFeature enablePython "python-bindings")
84 (lib.enableFeature enablePython "python-plugins")
85 (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "debug-info")
88 # For cross-compilation of Python bindings
89 makeFlags = [ "CFLAGS=-Wno-error=stringop-truncation -Wno-error=null-dereference" ];
91 enableParallelBuilding = true;
94 description = "Babeltrace /ˈbæbəltreɪs/ is an open-source trace manipulation toolkit";
95 homepage = "https://babeltrace.org";
96 license = lib.licenses.mit;
97 maintainers = with lib.maintainers; [ wentasah ];
98 mainProgram = "babeltrace2";
99 platforms = lib.platforms.all;