GNU bug report logs - #66623
[PATCH 0/3] Add Mahogany Window Manager

Previous Next

Package: guix-patches;

Reported by: Karl Hallsby <karl <at> hallsby.com>

Date: Thu, 19 Oct 2023 05:06:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 66623 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Thu, 19 Oct 2023 05:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Hallsby <karl <at> hallsby.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 19 Oct 2023 05:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: guix-patches <at> gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH 0/3] Add Mahogany Window Manager
Date: Thu, 19 Oct 2023 00:04:12 -0500
Add the Mahogany window manager, a "successor" to StumpWM, which
follows the same ideals, but runs on Wayland instead. Also adds
some C FFI Common Lisp bindings for Wayland and libxkbcommon.

Karl Hallsby (3):
  gnu: Add sbcl-xkbcommon package
  gnu: Add sbcl-wayland package
  gnu: Add mahogany

 gnu/packages/lisp-xyz.scm | 90 +++++++++++++++++++++++++++++++++++++++
 gnu/packages/wm.scm       | 71 ++++++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)


base-commit: ba72f8a8d5843fc56a3a7c9c4cf3fcce6a9b60bf
--
2.41.0




Information forwarded to glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Thu, 19 Oct 2023 05:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH 1/3] gnu: Add sbcl-xkbcommon package
Date: Thu, 19 Oct 2023 00:06:01 -0500
* gnu/packages/lisp-xyz.scm (New variable): Add sbcl-xkbcommon package
at most recent revision.
---
 gnu/packages/lisp-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index f2c581e65f..1ac43e7e3a 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -40,6 +40,7 @@
 ;;; Copyright © 2023 Roman Scherer <roman <at> burningswell.com>
 ;;; Copyright © 2023 ykonai <mail <at> ykonai.net>
 ;;; Copyright © 2023 Gabriel Hondet <gabriel.hondet <at> cominety.net>
+;;; Copyright © 2023 Raven Hallsby <karl <at> hallsby.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26738,6 +26739,51 @@ (define-public cl-nkeymaps
 (define-public ecl-nkeymaps
   (sbcl-package->ecl-package sbcl-nkeymaps))
 
+(define-public sbcl-xkbcommon
+  (let ((commit "aa9513d93f42d7816f88dd1bd8bd21375e7d7512")
+        (revision "0"))
+    (package
+      (name "sbcl-xkbcommon")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/sdilts/cl-xkbcommon")
+               (commit commit)))
+         (file-name (git-file-name "sbcl-xkbcommon" version))
+         (sha256
+          (base32 "02zdbkh7yliw9vg8i8wx2xgcpfni0fr4z0w19kkxvaib8xm9rx1q"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "xkbcommon.lisp"
+                 (("\\(define-foreign-library libxkbcommon" all)
+                  (string-append all "\n"
+                                 "  (:unix \""
+                                 (assoc-ref inputs "libxkbcommon")
+                                 "/lib/libxkbcommon.so\")"))))))))
+      (native-inputs
+       (list pkg-config))
+      (inputs
+       (list libxkbcommon
+             sbcl-cffi))
+      (home-page "https://github.com/sdilts/cl-xkbcommon")
+      (synopsis "Common Lisp FFI bindings for xkbcommon (libxkbcommon)")
+      (description
+       "Common Lisp FFI bindings for xkbcommon (libxkbcommon) using
+cffi-grovel.")
+      (license license:expat))))
+
+(define-public cl-xkbcommon
+  (sbcl-package->cl-source-package sbcl-xkbcommon))
+
+(define-public ecl-xkbcommon
+  (sbcl-package->ecl-package sbcl-xkbcommon))
+
 (define-public sbcl-njson
   (package
     (name "sbcl-njson")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Thu, 19 Oct 2023 05:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH 3/3] gnu: Add mahogany
Date: Thu, 19 Oct 2023 00:06:03 -0500
* gnu/packages/wm.scm (New variable): Add mahogany window manager.
---
 gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8576d0297d..86276165e3 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2023 Jonathan Brielamier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2023 Vessel Wave <vesselwave <at> disroot.org>
 ;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2023 Raven Hallsby <karl <at> hallsby.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2614,6 +2615,76 @@ (define-public sbcl-stumpwm-battery-portable
 modeline.  It can be displayed in the modeline with %B.")
     (license (list license:expat license:gpl3+))))
 
+(define-public mahogany
+  (let ((commit "ca4472bdb284b4f70bb7365fbaa421f6c2d382d1")
+        (revision "0"))
+  (package
+    (name "mahogany")
+    (version (git-version "0.0.0" revision commit))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/stumpwm/mahogany")
+             (commit commit)))
+       (file-name (git-file-name "mahogany" version))
+       (sha256
+        (base32 "1bnnw5p0wp1lm7jvf66mlgiaxbxxxnd54nhxd2794ajlgmdfps3h"))))
+    (build-system asdf-build-system/sbcl)
+    (native-inputs
+     (list sbcl-fiasco
+           sbcl-prove))
+    (inputs
+     (list libxkbcommon
+           sbcl-xkbcommon
+           sbcl-wayland
+           sbcl-alexandria
+           sbcl-cl-ansi-text
+           sbcl-terminfo
+           sbcl-snakes
+           sbcl-iterate
+           sbcl-cffi ;; Provides cffi-grovel
+           sbcl-closer-mop
+           sbcl-cl-ppcre
+           sbcl-clx
+           wayland
+           wayland-protocols))
+    (outputs '("out" "lib"))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'create-asdf-configuration 'build-program
+            (lambda* (#:key outputs #:allow-other-keys)
+              (build-program
+               (string-append (assoc-ref outputs "out") "/bin/mahogany")
+               outputs
+               #:entry-program '((mahogany::run-server) 0))))
+          (add-after 'build-program 'create-desktop-file
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (xsessions (string-append out "/share/xsessions")))
+                (mkdir-p xsessions)
+                (call-with-output-file
+                    (string-append xsessions "/mahogany.desktop")
+                  (lambda (file)
+                    (format file
+                       "[Desktop Entry]~@
+                        Name=stumpwm~@
+                        Comment=The Mahogany Window Manager~@
+                        Exec=~a/bin/mahogany~@
+                        TryExec=~@*~a/bin/mahogany~@
+                        Icon=~@
+                        Type=Application~%"
+                       out)))))))))
+    (synopsis "Window manager for Wayland written in Common Lisp")
+    (description
+     "Mahogany is a tiling window manager for Wayland modeled after StumpWM.
+While it is not a drop-in replacement for stumpwm, stumpwm users should be
+very comfortable with Mahogany.")
+    (home-page "https://github.com/stumpwm/mahogany")
+    (license license:gpl2+))))
+
 (define-public lemonbar
   (package
     (name "lemonbar")
-- 
2.41.0





Information forwarded to glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Thu, 19 Oct 2023 05:08:03 GMT) Full text and rfc822 format available.

Message #14 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH 2/3] gnu: Add sbcl-wayland package
Date: Thu, 19 Oct 2023 00:06:02 -0500
* gnu/packages/lisp-xyz.scm (New Variable): Add sbcl-wayland package.
---
 gnu/packages/lisp-xyz.scm | 44 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 1ac43e7e3a..b2180e5fcd 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -2174,6 +2174,50 @@ (define-public cl-clx
 (define-public ecl-clx
   (sbcl-package->ecl-package sbcl-clx))
 
+(define-public sbcl-wayland
+  (let ((commit "a92a5084b64102f538ab90212e99c7863e5338ae")
+        (revision "0"))
+    (package
+      (name "sbcl-cl-wayland")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/sdilts/cl-wayland")
+               (commit commit)))
+         (file-name (git-file-name "sbcl-wayland" version))
+         (sha256
+          (base32 "1r4fn9dc0dz2b30k8z243yacx1y5z21qk4zh2ildj7ak51qx53zf"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "wayland-server-core.lisp"
+                 (("\\(define-foreign-library wayland-server" all)
+                  (string-append all "\n"
+                                 "  (:unix \""
+                                 (assoc-ref inputs "wayland")
+                                 "/lib/libwayland-server.so\")"))))))))
+      (inputs
+       (list sbcl-cffi
+             sbcl-closer-mop
+             wayland))
+      (home-page "https://github.com/sdilts/cl-wayland")
+      (synopsis "Common Lisp FFI bindings for libwayland")
+      (description
+       "Common Lisp FFI bindings for libwayland, primarily for the mahogany
+window manager.")
+      (license license:bsd-3))))
+
+(define-public cl-wayland
+  (sbcl-package->cl-source-package sbcl-wayland))
+
+(define-public ecl-wayland
+  (sbcl-package->ecl-package sbcl-wayland))
+
 (define-public sbcl-clx-truetype
   (let ((commit "c6e10a918d46632324d5863a8ed067a83fc26de8")
         (revision "1"))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Thu, 19 Oct 2023 05:19:01 GMT) Full text and rfc822 format available.

Message #17 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: "Raven Hallsby" <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Subject: Re: [PATCH 3/3] gnu: Add mahogany
Date: Thu, 19 Oct 2023 00:16:36 -0500
Apologies on the ordering of the patches.

sbcl-xkbcommon and sbcl-wayland must come before Mahogany.

--
Raven Hallsby




Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Thu, 19 Oct 2023 12:21:02 GMT) Full text and rfc822 format available.

Message #20 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Karl Hallsby <karl <at> hallsby.com>
Cc: 66623 <at> debbugs.gnu.org
Subject: Re: [bug#66623] [PATCH 0/3] Add Mahogany Window Manager
Date: Thu, 19 Oct 2023 12:08:12 +0000
[Message part 1 (text/plain, inline)]
Patches 1 and 2 for cl-xkbcommon and cl-wayland applied as
cbd1c983e1b7bc392287226e44437996cc2cf750 and following with some
modifications (simplified 'fix-paths' phases using 'search-input-file'
function, full sentence for 'description' field, fixed commit messages).

Concerning patch 3 for mahogany, I think some part of it is missing and
mahogany can't work. Currently the heart library is not built, and the
paths to the heart and wlroots libraries have to be fixed (see the
"lisp/bindings/hrt-libs.lisp" file).
Could you send an updated patch?
Thanks.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Sun, 12 Nov 2023 15:56:01 GMT) Full text and rfc822 format available.

Message #23 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH] gnu: Add mahogany
Date: Sun, 12 Nov 2023 09:54:13 -0600
* gnu/packages/wm.scm (New variable): Add mahogany window manager.

gnu: Add mahogany-heart package

* gnu/packages/wm.scm (New variable): Add mahogany-heart package
at same revision as mahogany.
---
 gnu/packages/wm.scm | 120 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8576d0297d..745dc939ee 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2023 Jonathan Brielamier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2023 Vessel Wave <vesselwave <at> disroot.org>
 ;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2023 Raven Hallsby <karl <at> hallsby.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2614,6 +2615,125 @@ (define-public sbcl-stumpwm-battery-portable
 modeline.  It can be displayed in the modeline with %B.")
     (license (list license:expat license:gpl3+))))
 
+(define-public mahogany
+  (let ((commit "4b6b5f8667d8bfa07b889e9298e995f8eebb20bd")
+        (revision "0"))
+  (package
+    (name "mahogany")
+    (version (git-version "0.0.0" revision commit))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/stumpwm/mahogany")
+             (commit commit)))
+       (file-name (git-file-name "mahogany" version))
+       (sha256
+        (base32 "11kffkkimfk689r5cc351kxr7dadcj3d8dhm2ffvd5b2lz9jwlqp"))))
+    (build-system asdf-build-system/sbcl)
+    (native-inputs
+     (list sbcl-fiasco
+           sbcl-prove))
+    (inputs
+     (list mahogany-heart
+           sbcl-xkbcommon
+           libxkbcommon
+           sbcl-cl-wayland
+           sbcl-alexandria
+           sbcl-cl-ansi-text
+           sbcl-terminfo
+           sbcl-snakes
+           sbcl-iterate
+           sbcl-cffi ;; Provides cffi-grovel
+           wayland
+           wayland-protocols
+           wlroots))
+    (outputs '("out" "lib"))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'delete-submodules
+            (lambda* (#:key outputs #:allow-other-keys)
+              (delete-file-recursively "./dependencies")
+              (delete-file-recursively "./heart")))
+          (add-after 'delete-submodules 'fix-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "lisp/bindings/hrt-libs.lisp"
+                (("libheart.so")
+                 (search-input-file inputs
+                                    "/lib/libheart.so"))
+                (("libwlroots.so")
+                 (search-input-file inputs
+                                    "/lib/libwlroots.so")))))
+          (add-after 'create-asdf-configuration 'build-program
+            (lambda* (#:key outputs #:allow-other-keys)
+              (build-program
+               (string-append (assoc-ref outputs "out") "/bin/mahogany")
+               outputs
+               #:entry-program '((mahogany::run-server) 0))))
+          (add-after 'build-program 'create-desktop-file
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (xsessions (string-append out "/share/xsessions"))
+                     (wayland-sessions (string-append out "/share/wayland-sessions")))
+                (define (desktop-file file)
+                  (format file
+                     "[Desktop Entry]~@
+                      Name=stumpwm~@
+                      Comment=The Mahogany Window Manager~@
+                      Exec=~a/bin/mahogany~@
+                      TryExec=~@*~a/bin/mahogany~@
+                      Icon=~@
+                      Type=Application~%"
+                     out))
+                (mkdir-p xsessions)
+                (call-with-output-file
+                    (string-append xsessions "/mahogany.desktop")
+                  desktop-file)
+                (mkdir-p wayland-sessions)
+                (call-with-output-file
+                    (string-append wayland-sessions "/mahogany.desktop")
+                  desktop-file)))))))
+    (synopsis "Window manager for Wayland written in Common Lisp")
+    (description
+     "Mahogany is a tiling window manager for Wayland modeled after StumpWM.
+While it is not a drop-in replacement for stumpwm, stumpwm users should be
+very comfortable with Mahogany.")
+    (home-page "https://github.com/stumpwm/mahogany")
+    (license license:gpl2+))))
+
+(define-public mahogany-heart
+  (package
+    (name "mahogany-heart")
+    (version (package-version mahogany))
+    (source (package-source mahogany))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list wlroots
+           libxkbcommon))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'chdir
+            (lambda _ (chdir "heart")))
+          (add-after 'chdir 'delete-submodules
+            (lambda* (#:key outputs #:allow-other-keys)
+              (delete-file-recursively "./subprojects"))))))
+    (synopsis "An alternative C backend to a Wayland compositor to use with Mahogany")
+    (description
+     "Mahogany-heart's task is to setup the initial state of the
+compositor, render the output, and initially handle new connections to
+the compositor. If needed, the backend will also wrap some wlroots
+functions so that less foreign code needs to be called from the other
+language. is a tiling window manager for Wayland modeled after
+StumpWM.")
+    (home-page (package-home-page mahogany))
+    (license (package-license mahogany))))
+
 (define-public lemonbar
   (package
     (name "lemonbar")

base-commit: 970e69bdc78023b444ab3d9a81b07b1a02fc9ab1
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Sun, 12 Nov 2023 16:01:02 GMT) Full text and rfc822 format available.

Message #26 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [PATCH] gnu: Add mahogany
Date: Sun, 12 Nov 2023 09:59:28 -0600
* gnu/packages/wm.scm (New variable): Add mahogany window manager.

gnu: Add mahogany-heart package

* gnu/packages/wm.scm (New variable): Add mahogany-heart package
at same revision as mahogany.
---
 gnu/packages/wm.scm | 120 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8576d0297d..745dc939ee 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2023 Jonathan Brielamier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2023 Vessel Wave <vesselwave <at> disroot.org>
 ;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2023 Raven Hallsby <karl <at> hallsby.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2614,6 +2615,125 @@ (define-public sbcl-stumpwm-battery-portable
 modeline.  It can be displayed in the modeline with %B.")
     (license (list license:expat license:gpl3+))))
 
+(define-public mahogany
+  (let ((commit "4b6b5f8667d8bfa07b889e9298e995f8eebb20bd")
+        (revision "0"))
+  (package
+    (name "mahogany")
+    (version (git-version "0.0.0" revision commit))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/stumpwm/mahogany")
+             (commit commit)))
+       (file-name (git-file-name "mahogany" version))
+       (sha256
+        (base32 "11kffkkimfk689r5cc351kxr7dadcj3d8dhm2ffvd5b2lz9jwlqp"))))
+    (build-system asdf-build-system/sbcl)
+    (native-inputs
+     (list sbcl-fiasco
+           sbcl-prove))
+    (inputs
+     (list mahogany-heart
+           sbcl-xkbcommon
+           libxkbcommon
+           sbcl-cl-wayland
+           sbcl-alexandria
+           sbcl-cl-ansi-text
+           sbcl-terminfo
+           sbcl-snakes
+           sbcl-iterate
+           sbcl-cffi ;; Provides cffi-grovel
+           wayland
+           wayland-protocols
+           wlroots))
+    (outputs '("out" "lib"))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'delete-submodules
+            (lambda* (#:key outputs #:allow-other-keys)
+              (delete-file-recursively "./dependencies")
+              (delete-file-recursively "./heart")))
+          (add-after 'delete-submodules 'fix-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "lisp/bindings/hrt-libs.lisp"
+                (("libheart.so")
+                 (search-input-file inputs
+                                    "/lib/libheart.so"))
+                (("libwlroots.so")
+                 (search-input-file inputs
+                                    "/lib/libwlroots.so")))))
+          (add-after 'create-asdf-configuration 'build-program
+            (lambda* (#:key outputs #:allow-other-keys)
+              (build-program
+               (string-append (assoc-ref outputs "out") "/bin/mahogany")
+               outputs
+               #:entry-program '((mahogany::run-server) 0))))
+          (add-after 'build-program 'create-desktop-file
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (xsessions (string-append out "/share/xsessions"))
+                     (wayland-sessions (string-append out "/share/wayland-sessions")))
+                (define (desktop-file file)
+                  (format file
+                     "[Desktop Entry]~@
+                      Name=stumpwm~@
+                      Comment=The Mahogany Window Manager~@
+                      Exec=~a/bin/mahogany~@
+                      TryExec=~@*~a/bin/mahogany~@
+                      Icon=~@
+                      Type=Application~%"
+                     out))
+                (mkdir-p xsessions)
+                (call-with-output-file
+                    (string-append xsessions "/mahogany.desktop")
+                  desktop-file)
+                (mkdir-p wayland-sessions)
+                (call-with-output-file
+                    (string-append wayland-sessions "/mahogany.desktop")
+                  desktop-file)))))))
+    (synopsis "Window manager for Wayland written in Common Lisp")
+    (description
+     "Mahogany is a tiling window manager for Wayland modeled after StumpWM.
+While it is not a drop-in replacement for stumpwm, stumpwm users should be
+very comfortable with Mahogany.")
+    (home-page "https://github.com/stumpwm/mahogany")
+    (license license:gpl2+))))
+
+(define-public mahogany-heart
+  (package
+    (name "mahogany-heart")
+    (version (package-version mahogany))
+    (source (package-source mahogany))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config))
+    (inputs
+     (list wlroots
+           libxkbcommon))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'chdir
+            (lambda _ (chdir "heart")))
+          (add-after 'chdir 'delete-submodules
+            (lambda* (#:key outputs #:allow-other-keys)
+              (delete-file-recursively "./subprojects"))))))
+    (synopsis "An alternative C backend to a Wayland compositor to use with Mahogany")
+    (description
+     "Mahogany-heart's task is to setup the initial state of the
+compositor, render the output, and initially handle new connections to
+the compositor. If needed, the backend will also wrap some wlroots
+functions so that less foreign code needs to be called from the other
+language. is a tiling window manager for Wayland modeled after
+StumpWM.")
+    (home-page (package-home-page mahogany))
+    (license (package-license mahogany))))
+
 (define-public lemonbar
   (package
     (name "lemonbar")

base-commit: 970e69bdc78023b444ab3d9a81b07b1a02fc9ab1
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Sun, 12 Nov 2023 16:41:01 GMT) Full text and rfc822 format available.

Message #29 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: "Karl G. Hallsby" <karl <at> hallsby.com>
To: 66623 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>
Subject: Re: [PATCH] gnu: Add mahogany
Date: Sun, 12 Nov 2023 10:27:23 -0600
> Currently the heart library is not built...

The heard library has been added in the revised patch.

> ... the paths to the heart and wlroots libraries have to be fixed (see
> the "lisp/bindings/hrt-libs.lisp" file).

This is actually already handled by Guix.
guix$ ./pre-int-env guix build mahogany
/gnu/store/xdgs2j10gxqx3vwa81mskq77si96pj4r-mahogany-0.0.0-0.4b6b5f8-lib
/gnu/store/fl796d5hsdakxsvm3yn5i2qspas4q9x0-mahogany-0.0.0-0.4b6b5f8

$ cat
/gnu/store/xdgs2j10gxqx3vwa81mskq77si96pj4r-mahogany-0.0.0-0.4b6b5f8-lib/share/common-lisp/sbcl/mahogany/lisp/bindings/hrt-libs.lisp

The hrt-bindings.lisp file has its shared libraries paths replaced by
Guix. When I run the build, I see the paths have been replaced by the
appropriate paths into the store.

In addition, I have run a VM that boots and runs mahogany as it
currently stands (which just has a solid-background screen with support
for just one keybinding, one to exit. I have confirmed with Mahogany's
developer that this is the expected behvaior for now.

There have been new commits since I originally submitted this patch.
Should I grab the latest version and use that for the final submission
to Guix?

-- 
Raven Hallsby




Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Wed, 15 Nov 2023 15:42:02 GMT) Full text and rfc822 format available.

Message #32 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: "Karl G. Hallsby" <karl <at> hallsby.com>
Cc: 66623 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add mahogany
Date: Wed, 15 Nov 2023 13:37:21 +0000
[Message part 1 (text/plain, inline)]
"Karl G. Hallsby" <karl <at> hallsby.com> skribis:

> In addition, I have run a VM that boots and runs mahogany as it
> currently stands (which just has a solid-background screen with support
> for just one keybinding, one to exit. I have confirmed with Mahogany's
> developer that this is the expected behvaior for now.
>
> There have been new commits since I originally submitted this patch.
> Should I grab the latest version and use that for the final submission
> to Guix?

Hi.
So currently users would not be able to do anything with Mahogany?
I think it would be better to wait until Mahogany can do some
basic things, like opening a window for an application, before adding it
to Guix.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Wed, 22 Nov 2023 14:46:02 GMT) Full text and rfc822 format available.

Message #35 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 66623 <at> debbugs.gnu.org, "Karl G. Hallsby" <karl <at> hallsby.com>
Subject: Re: [bug#66623] [PATCH] gnu: Add mahogany
Date: Wed, 22 Nov 2023 15:44:50 +0100
Hi Karl and Guillaume,

What’s the status of this patch set?

TIA,
Ludo’.

Guillaume Le Vaillant <glv <at> posteo.net> skribis:

> "Karl G. Hallsby" <karl <at> hallsby.com> skribis:
>
>> In addition, I have run a VM that boots and runs mahogany as it
>> currently stands (which just has a solid-background screen with support
>> for just one keybinding, one to exit. I have confirmed with Mahogany's
>> developer that this is the expected behvaior for now.
>>
>> There have been new commits since I originally submitted this patch.
>> Should I grab the latest version and use that for the final submission
>> to Guix?
>
> Hi.
> So currently users would not be able to do anything with Mahogany?
> I think it would be better to wait until Mahogany can do some
> basic things, like opening a window for an application, before adding it
> to Guix.




Information forwarded to guix-patches <at> gnu.org:
bug#66623; Package guix-patches. (Wed, 22 Nov 2023 17:37:02 GMT) Full text and rfc822 format available.

Message #38 received at 66623 <at> debbugs.gnu.org (full text, mbox):

From: "Karl G. Hallsby" <karl <at> hallsby.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Guillaume Le Vaillant <glv <at> posteo.net>, 66623 <at> debbugs.gnu.org
Subject: Re: [bug#66623] [PATCH] gnu: Add mahogany
Date: Wed, 22 Nov 2023 11:34:13 -0600
> What’s the status of this patch set?

The patch set is complete.

>> So currently users would not be able to do anything with Mahogany?
You can boot a VM with mahogany and log into the mahogany session, but
you cannot really do anything yet. Mahogany is still in early
development; the only thing you can do is exit mahogany with a
keybinding.

--
Karl Hallsby




This bug report was last modified 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.