-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
python311Packages.babeltrace: init at 1.5.11 #310617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0d7dc9e
babeltrace: reformat with nixfmt-rfc-style
wentasah b0a25ec
babeltrace: add update script
wentasah 460afd4
babeltrace: 1.5.8 -> 1.5.11
doronbehar cd8f5fc
babeltrace: add myself as maintainer
wentasah e09452b
python311Packages.babeltrace: init at 1.5.11
hacker1024 e4e8867
babeltrace2: init at 2.0.6
wentasah 68bc018
python311Packages.babeltrace2: init at 2.0.6
wentasah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchurl, | ||
| gitUpdater, | ||
| autoreconfHook, | ||
| pkg-config, | ||
| glib, | ||
| libuuid, | ||
| popt, | ||
| elfutils, | ||
| enablePython ? false, | ||
| pythonPackages ? null, | ||
| swig2, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "babeltrace"; | ||
| version = "1.5.11"; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://www.efficios.com/files/babeltrace/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2"; | ||
| sha256 = "Z7Q6qu9clR+nrxpVfPcgGhH+iYdrfCK6CgPLwxbbWpw="; | ||
| }; | ||
|
|
||
| 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 | ||
| ] | ||
| ++ lib.optionals enablePython [ | ||
| swig2 | ||
| pythonPackages.setuptools | ||
| ]; | ||
| 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") | ||
| ] | ||
| ++ 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 { | ||
| url = "https://git.efficios.com/babeltrace.git"; | ||
| rev-prefix = "v"; | ||
| # Versions 2.x are packaged independently as babeltrace2 | ||
| ignoredVersions = "^[^1]"; | ||
| }; | ||
|
|
||
| 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 | ||
| wentasah | ||
| ]; | ||
| }; | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchFromGitHub, | ||
| fetchpatch, | ||
| autoreconfHook, | ||
| pkg-config, | ||
| glib, | ||
| elfutils, | ||
| bison, | ||
| flex, | ||
| asciidoc, | ||
| xmlto, | ||
| docbook_xml_dtd_45, | ||
| docbook_xsl, | ||
| enablePython ? false, | ||
| python ? null, | ||
| pythonPackages ? null, | ||
| swig, | ||
| ensureNewerSourcesForZipFilesHook, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "babeltrace2"; | ||
| version = "2.0.6"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "efficios"; | ||
| repo = "babeltrace"; | ||
| rev = "v${version}"; | ||
| hash = "sha256-L4YTqPxvWynUBnmAQnlJ2RNbEv9MhBxQOsqbWix8ZwU="; | ||
| }; | ||
|
|
||
| patches = [ | ||
| # Patches needed for Python 3.12 | ||
| (fetchpatch { | ||
| # python: Use standalone 'sysconfig' module | ||
| url = "https://github.com/efficios/babeltrace/commit/452480eb6820df9973d50431a479ca547815ae08.patch"; | ||
| hash = "sha256-YgUKHJzdliNUsTY29E0xxcUjqVWn4EvxyTs0B+O+jrI="; | ||
| }) | ||
| (fetchpatch { | ||
| # python: replace distutils with setuptools | ||
| url = "https://github.com/efficios/babeltrace/commit/6ec97181a525a3cd64cedbcd0df905ed9e84ba03.patch"; | ||
| hash = "sha256-1hlEkPcRUpf2+iEXqHXcCDOaLTg+eaVcahqZlA8m5QY="; | ||
| }) | ||
| (fetchpatch { | ||
| # fix: python: monkey patch the proper sysconfig implementation | ||
| url = "https://github.com/efficios/babeltrace/commit/927263e4ea62877af7240cfdb1514ae949dbfc2e.patch"; | ||
| hash = "sha256-HNRQ7uw26FUKCQ/my6//OL2xsHdOGlQUq5zIKtg9OGw="; | ||
| }) | ||
| ]; | ||
|
|
||
| outputs = [ | ||
| "out" | ||
| "man" | ||
| "dev" | ||
| ]; | ||
|
|
||
| nativeBuildInputs = | ||
| [ | ||
| autoreconfHook | ||
| pkg-config | ||
| glib | ||
| bison | ||
| flex | ||
| asciidoc | ||
| xmlto | ||
| docbook_xml_dtd_45 | ||
| docbook_xsl | ||
| ] | ||
| ++ lib.optionals enablePython [ | ||
| swig | ||
| pythonPackages.setuptools | ||
| ensureNewerSourcesForZipFilesHook | ||
| ]; | ||
|
|
||
| buildInputs = [ | ||
| glib | ||
| elfutils | ||
| ] ++ lib.optional enablePython python; | ||
|
|
||
| configureFlags = [ | ||
| (lib.enableFeature enablePython "python-bindings") | ||
| (lib.enableFeature enablePython "python-plugins") | ||
| (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "debug-info") | ||
| ]; | ||
|
|
||
| # For cross-compilation of Python bindings | ||
| makeFlags = [ "CFLAGS=-Wno-error=stringop-truncation -Wno-error=null-dereference" ]; | ||
|
|
||
| enableParallelBuilding = true; | ||
|
|
||
| meta = { | ||
| description = "Babeltrace /ˈbæbəltreɪs/ is an open-source trace manipulation toolkit"; | ||
| homepage = "https://babeltrace.org"; | ||
| license = lib.licenses.mit; | ||
| maintainers = with lib.maintainers; [ wentasah ]; | ||
| mainProgram = "babeltrace2"; | ||
| platforms = lib.platforms.all; | ||
| }; | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, is upstream aware that they need these loosening CFLAGS to make it work? It'd be nice to put a link if they do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any upstream commit addressing that. I'll let them know later, I'm in hurry right know. I just put there a comment that its needed when cross-compiling Python bindings.