Subject: [PATCH] gnu: xmonad: Re-add xmonad.desktop file

From: Saku Laesvuori <[email-masked]>
Date: Fri, 9 Aug 2024 14:49:00 +0300

* gnu/packages/wm.scm (xmonad)[arguments]: Re-add 'install-xsession phase
  to enable starting xmonad from a display manager.

Change-Id: I8b29e5a44e9b7a47256a5115e36fb7ff6e0e471a
---
 gnu/packages/wm.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index ad74fb5cf7..7ebed1fd67 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -874,6 +874,23 @@ (define-public xmonad
     (properties '((upstream-name . "xmonad")))
     (inputs (list ghc-x11 ghc-data-default-class ghc-setlocale))
     (native-inputs (list ghc-quickcheck ghc-quickcheck-classes))
+    (arguments
+      (list
+       #:phases
+       #~(modify-phases %standard-phases
+           (add-after 'install 'install-xsession
+             (lambda _
+               (let ((xsessions (string-append #$output "/share/xsessions")))
+                 (mkdir-p xsessions)
+                 (call-with-output-file (string-append xsessions
+                                                       "/xmonad.desktop")
+                  (lambda (port)
+                    (format port "~
+                     [Desktop Entry]~@
+                     Name=~a~@
+                     Comment=xmonad window manager~@
+                     Exec=~a/bin/xmonad~@
+                     Type=Application~%" #$name #$output)))))))))
     (home-page "http://xmonad.org")
     (synopsis "Tiling window manager")
     (description

base-commit: 20dbf225f332ccc707578263ed710dcf2a8fb78e
-- 
2.45.2