Subject: [bug#52660] [PATCH] gnu: Enable babeltrace Python's bindings.

From: Olivier Dion <[email-masked]>
Date: Sun, 19 Dec 2021 14:19:52 -0500

* gnu/packages/instrumentation.scm (babeltrace)
[tests?]: Set to false.
[configure-flags]: Enable Python's plugins and bindings.
[make-flags]: Add output's /lib to linker rpath.
---
 gnu/packages/instrumentation.scm | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index 564547324c..4b2fe4095a 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -32,6 +32,7 @@ (define-module (gnu packages instrumentation)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
@@ -57,19 +58,23 @@ (define-public babeltrace
     (build-system gnu-build-system)
 
     (arguments
-     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
-       #:configure-flags '("--enable-debug-info"
-                           "--enable-man-pages"
-                           "--disable-python-bindings"
-                           "--disable-python-plugins")
-                         #:phases
-                         (modify-phases %standard-phases
-                           ;; These are recommended in the project's README for a development
-                           ;; build configuration.
-                           (add-before 'configure 'set-environment-variables
-                             (lambda _
-                               (setenv "BABELTRACE_DEV_MODE" "1")
-                               (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
+     `(#:tests? #f  ; FIXME - When Python's bindings are enabled, tests do not pass.
+       #:make-flags
+       (list (string-append "LDFLAGS=-Wl,-rpath="
+                            (assoc-ref %outputs "out") "/lib"))
+       #:configure-flags
+       '("--enable-debug-info"
+         "--enable-man-pages"
+         "--enable-python-bindings"
+         "--enable-python-plugins")
+       #:phases
+       (modify-phases %standard-phases
+         ;; These are recommended in the project's README for a development
+         ;; build configuration.
+         (add-before 'configure 'set-environment-variables
+           (lambda _
+             (setenv "BABELTRACE_DEV_MODE" "1")
+             (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
     (inputs
      (list glib))
     ;; NOTE - elfutils is used for the LTTng debug information filter
-- 
2.34.0