Subject: [bug#68554] [PATCH v4 5/5] gnu: qt-creator: Add support for demangling D and Rust symbols.

From: Maxim Cournoyer <[email-masked]>
Date: Fri, 19 Jan 2024 23:37:09 -0500

* gnu/packages/qt.scm (qt-creator) [inputs]: Add d-demangler and
rust-rustc-demangle-capi-0.1 (where supported).

Change-Id: I13122c0d148f283268d59919ade1459b5c7012a5
---

Changes in v4:
 - Only add rust-rustc-demangle-capi-0.1 input if supported

 gnu/packages/qt.scm | 41 ++++++++++++++++++++++++-----------------
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a6bbc2429a..e3c9f1accd 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -71,9 +71,11 @@ (define-module (gnu packages qt)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
+  #:use-module (gnu packages crates-io)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages dlang)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages enchant)
@@ -5146,23 +5148,28 @@ (define-public qt-creator
            vulkan-headers
            xvfb-run))
     (inputs
-     (list bash-minimal
-           coreutils-minimal
-           clang
-           clazy
-           elfutils
-           gdb
-           kcachegrind
-           libxkbcommon
-           llvm
-           qt5compat
-           qtdeclarative
-           qtshadertools
-           qtsvg
-           yaml-cpp
-           valgrind
-           vulkan-loader
-           `(,zstd "lib")))
+     (append
+      (list bash-minimal
+            coreutils-minimal
+            clang
+            clazy
+            d-demangler
+            elfutils
+            gdb
+            kcachegrind
+            libxkbcommon
+            llvm
+            qt5compat
+            qtdeclarative
+            qtshadertools
+            qtsvg
+            yaml-cpp
+            valgrind
+            vulkan-loader
+            `(,zstd "lib"))
+      (if (supported-package? rust-rustc-demangle-capi-0.1)
+          (list rust-rustc-demangle-capi-0.1)
+          '())))
     (home-page "https://www.qt.io/")
     (synopsis "Integrated development environment (IDE) for Qt")
     (description "Qt Creator is an IDE tailored to the needs of Qt developers.
-- 
2.41.0