* [bug#66623] [PATCH 1/3] gnu: Add sbcl-xkbcommon package
2023-10-19 5:04 [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Karl Hallsby via Guix-patches via
@ 2023-10-19 5:06 ` Karl Hallsby via Guix-patches via
2023-10-19 5:06 ` [bug#66623] [PATCH 2/3] gnu: Add sbcl-wayland package Karl Hallsby via Guix-patches via
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2023-10-19 5:06 UTC (permalink / raw)
To: 66623; +Cc: Karl Hallsby, Guillaume Le Vaillant, Katherine Cox-Buday, jgart
* 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@burningswell.com>
;;; Copyright © 2023 ykonai <mail@ykonai.net>
;;; Copyright © 2023 Gabriel Hondet <gabriel.hondet@cominety.net>
+;;; Copyright © 2023 Raven Hallsby <karl@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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH 2/3] gnu: Add sbcl-wayland package
2023-10-19 5:04 [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Karl Hallsby via Guix-patches via
2023-10-19 5:06 ` [bug#66623] [PATCH 1/3] gnu: Add sbcl-xkbcommon package Karl Hallsby via Guix-patches via
@ 2023-10-19 5:06 ` Karl Hallsby via Guix-patches via
2023-10-19 5:06 ` [bug#66623] [PATCH 3/3] gnu: Add mahogany Karl Hallsby via Guix-patches via
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2023-10-19 5:06 UTC (permalink / raw)
To: 66623; +Cc: Karl Hallsby, Guillaume Le Vaillant, Katherine Cox-Buday, jgart
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH 3/3] gnu: Add mahogany
2023-10-19 5:04 [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Karl Hallsby via Guix-patches via
2023-10-19 5:06 ` [bug#66623] [PATCH 1/3] gnu: Add sbcl-xkbcommon package Karl Hallsby via Guix-patches via
2023-10-19 5:06 ` [bug#66623] [PATCH 2/3] gnu: Add sbcl-wayland package Karl Hallsby via Guix-patches via
@ 2023-10-19 5:06 ` Karl Hallsby via Guix-patches via
2023-10-19 5:16 ` Raven Hallsby via Guix-patches via
2023-10-19 12:08 ` [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Guillaume Le Vaillant
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2023-10-19 5:06 UTC (permalink / raw)
To: 66623; +Cc: Karl Hallsby
* 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@web.de>
;;; Copyright © 2023 Vessel Wave <vesselwave@disroot.org>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Raven Hallsby <karl@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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH 0/3] Add Mahogany Window Manager
2023-10-19 5:04 [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Karl Hallsby via Guix-patches via
` (2 preceding siblings ...)
2023-10-19 5:06 ` [bug#66623] [PATCH 3/3] gnu: Add mahogany Karl Hallsby via Guix-patches via
@ 2023-10-19 12:08 ` Guillaume Le Vaillant
2023-11-12 15:54 ` [bug#66623] [PATCH] gnu: Add mahogany Karl Hallsby via Guix-patches via
2023-11-12 15:59 ` Karl Hallsby via Guix-patches via
5 siblings, 0 replies; 12+ messages in thread
From: Guillaume Le Vaillant @ 2023-10-19 12:08 UTC (permalink / raw)
To: Karl Hallsby; +Cc: 66623
[-- Attachment #1: Type: text/plain, Size: 557 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH] gnu: Add mahogany
2023-10-19 5:04 [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Karl Hallsby via Guix-patches via
` (3 preceding siblings ...)
2023-10-19 12:08 ` [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Guillaume Le Vaillant
@ 2023-11-12 15:54 ` Karl Hallsby via Guix-patches via
2023-11-12 16:27 ` Karl G. Hallsby via Guix-patches via
2023-11-12 15:59 ` Karl Hallsby via Guix-patches via
5 siblings, 1 reply; 12+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2023-11-12 15:54 UTC (permalink / raw)
To: 66623; +Cc: Karl Hallsby
* 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@web.de>
;;; Copyright © 2023 Vessel Wave <vesselwave@disroot.org>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Raven Hallsby <karl@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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH] gnu: Add mahogany
2023-11-12 15:54 ` [bug#66623] [PATCH] gnu: Add mahogany Karl Hallsby via Guix-patches via
@ 2023-11-12 16:27 ` Karl G. Hallsby via Guix-patches via
2023-11-15 13:37 ` Guillaume Le Vaillant
0 siblings, 1 reply; 12+ messages in thread
From: Karl G. Hallsby via Guix-patches via @ 2023-11-12 16:27 UTC (permalink / raw)
To: 66623; +Cc: Guillaume Le Vaillant
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH] gnu: Add mahogany
2023-11-12 16:27 ` Karl G. Hallsby via Guix-patches via
@ 2023-11-15 13:37 ` Guillaume Le Vaillant
2023-11-22 14:44 ` Ludovic Courtès
0 siblings, 1 reply; 12+ messages in thread
From: Guillaume Le Vaillant @ 2023-11-15 13:37 UTC (permalink / raw)
To: Karl G. Hallsby; +Cc: 66623
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
"Karl G. Hallsby" <karl@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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH] gnu: Add mahogany
2023-11-15 13:37 ` Guillaume Le Vaillant
@ 2023-11-22 14:44 ` Ludovic Courtès
2023-11-22 17:34 ` Karl G. Hallsby via Guix-patches via
0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2023-11-22 14:44 UTC (permalink / raw)
To: Guillaume Le Vaillant; +Cc: 66623, Karl G. Hallsby
Hi Karl and Guillaume,
What’s the status of this patch set?
TIA,
Ludo’.
Guillaume Le Vaillant <glv@posteo.net> skribis:
> "Karl G. Hallsby" <karl@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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH] gnu: Add mahogany
2023-11-22 14:44 ` Ludovic Courtès
@ 2023-11-22 17:34 ` Karl G. Hallsby via Guix-patches via
0 siblings, 0 replies; 12+ messages in thread
From: Karl G. Hallsby via Guix-patches via @ 2023-11-22 17:34 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guillaume Le Vaillant, 66623
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#66623] [PATCH] gnu: Add mahogany
2023-10-19 5:04 [bug#66623] [PATCH 0/3] Add Mahogany Window Manager Karl Hallsby via Guix-patches via
` (4 preceding siblings ...)
2023-11-12 15:54 ` [bug#66623] [PATCH] gnu: Add mahogany Karl Hallsby via Guix-patches via
@ 2023-11-12 15:59 ` Karl Hallsby via Guix-patches via
5 siblings, 0 replies; 12+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2023-11-12 15:59 UTC (permalink / raw)
To: 66623; +Cc: Karl Hallsby
* 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@web.de>
;;; Copyright © 2023 Vessel Wave <vesselwave@disroot.org>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Raven Hallsby <karl@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
^ permalink raw reply related [flat|nested] 12+ messages in thread