Subject: [bug#78560] [PATCH 4/4] gnu: Add muon-as-meson-wrapper.

From: Maxim Cournoyer <[email-masked]>
Date: Fri, 23 May 2025 15:38:27 +0900

* gnu/packages/build-tools.scm (muon-as-meson-wrapper): New variable.

Change-Id: I13d9a71e0be896e47115379415b88f0969e207a5
---
 gnu/packages/build-tools.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 58bad94ff8..f008656a8b 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -43,6 +43,7 @@ (define-module (gnu packages build-tools)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system guile)
+  #:use-module (guix build-system trivial)
   #:use-module (guix modules)
   #:use-module (gnu packages)
   #:use-module (gnu packages adns)
@@ -416,6 +417,25 @@ (define-public muon
 with minimal dependencies.")
     (license license:gpl3)))            ;for the combined work
 
+(define-public muon-as-meson-wrapper
+  (package/inherit muon
+    (name "muon-as-meson-wrapper")
+    (build-system trivial-build-system)
+    (arguments
+     (list #:builder
+           (with-imported-modules '((guix build utils))
+             #~(begin
+                 (use-modules (guix build utils))
+                 (let ((bindir (string-append #$output "/bin"))
+                       (samu (string-append #$(this-package-input "muon")
+                                            "/bin/muon")))
+                   (mkdir-p bindir)
+                   (symlink samu (string-append bindir "/meson")))))))
+    (inputs (list muon))
+    (description "This package provides the @command{meson} command,
+implemented as a symbolic link to the @command{muon} command of @code{muon}
+package.")))
+
 (define-public premake4
   (package
     (name "premake")
-- 
2.49.0