Subject: [bug#68554] [PATCH v4 4/5] gnu: Add d-demangler.

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

* gnu/packages/dlang.scm (d-demangler): New variable.

Change-Id: Ic1dc8fb8adc1b4be859552e4add074a35bdfc6d0
---

(no changes since v1)

 gnu/packages/dlang.scm | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 58411166b7..e3052cc032 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2017, 2019, 2022 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2020 Guy Fleury Iteriteka <[email-masked]>
 ;;; Copyright © 2021-2023 Efraim Flashner <[email-masked]>
-;;; Copyright © 2021 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2021, 2024 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2022 ( <[email-masked]>
 ;;; Copyright © 2022 Esther Flashner <[email-masked]>
 ;;;
@@ -617,3 +617,35 @@ (define-public gtkd
     (synopsis "D binding and OO wrapper of GTK+")
     (description "This package provides bindings to GTK+ for D.")
     (license license:lgpl2.1)))
+
+(define-public d-demangler
+  (package
+    (name "d-demangler")
+    (version "0.0.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/lievenhey/d_demangler")
+                    (commit (string-append "version-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "13lbbxlaa1mffjs57xchl1g6kyr5lxi0z5x7snyvym0knslxwx2g"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ;no test suite
+      #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+                           "d_demangle")
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure)
+                   (replace 'install
+                     (lambda _
+                       (install-file "libd_demangle.so"
+                                     (string-append #$output "/lib")))))))
+    (native-inputs (list dmd))
+    (home-page "https://github.com/lievenhey/d_demangler")
+    (synopsis "Utility to demangle D symbols")
+    (description "@command{d_demangle} is a small utility that can be used to
+demangle D symbols.  A shared library is also provided.")
+    (license license:gpl3+)))
-- 
2.41.0