Subject: bug#52806: closed (Re: [bug#52806] [PATCH v5] gnu: Add xinitrc-xsession.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 04 Feb 2022 19:53:02 +0000

Your bug report

#52806: [PATCH] gnu: Add xinitrc-xsession.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
52806: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52806
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#52806] [PATCH v5] gnu: Add xinitrc-xsession.
From: Liliana Marie Prikler <[email-masked]>
To: John Kehayias <[email-masked]>, Maxime Devos <[email-masked]>
Cc: [email-masked]
Date: Fri, 04 Feb 2022 20:52:09 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Am Dienstag, dem 11.01.2022 um 22:34 +0000 schrieb John Kehayias:
> Hi Maxime,
> 
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> 
> On Tuesday, January 11th, 2022 at 5:24 PM, Maxime Devos wrote:
> 
> > 'outputs' is unused here, so you can simplify the lambda from
> > (lambda * (#:key outputs #:allow-other-keys) ...)
> > to
> > (lambda _ ...).
> > 
> 
> Right, another thing that can be removed here with the gexp. Thanks!
> 
> John
Hi, I was told Maxime already reviewed this, so I pushed it.  Cheers!

Subject: [PATCH] gnu: Add xinitrc-xsession.
From: John Kehayias <[email-masked]>
To: Guix-patches <[email-masked]>
Date: Sun, 26 Dec 2021 16:46:44 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Guix,

This is a simple package from Arch's AUR that provides an xsession for using a user's ~/.xinitrc. I've been using this for a while to launch a bare WM (XMonad recently, but others in the past) from GDM and SDDM. There's no formal homepage and the git url will show as 404 in guix lint (I think because there is only git access). I added a description as well.

Thanks!

John

From de0672c0376d7e47165c1f1d62aa4413b33717fa Mon Sep 17 00:00:00 2001
From: John Kehayias <[email-masked]>
Date: Sun, 26 Dec 2021 11:43:26 -0500
Subject: [PATCH] gnu: Add xinitrc-xsession.

* gnu/packages/wm.scm (xinitrc-xsession): New variable.
---
 gnu/packages/wm.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index c6881154fe..a79a4c7fce 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -48,6 +48,7 @@
 ;;; Copyright © 2021 Petr Hodina <[email-masked]>
 ;;; Copyright © 2021 jgart <[email-masked]>
 ;;; Copyright © 2021 Disseminate Dissent <[email-masked]>
+;;; Copyright © 2021 John Kehayias <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,7 @@ (define-module (gnu packages wm)
   #:use-module (guix git-download)
   #:use-module (guix build-system asdf)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
   #:use-module (guix build-system meson)
@@ -2317,6 +2319,43 @@ (define-public xclickroot
 button is pressed on the root window.")
     (license license:public-domain)))
 
+(define-public xinitrc-xsession
+  (let ((commit "cbfc77a1ccaf07b7d8a35f4d8007c7102f365374"))
+    (package
+      (name "xinitrc-xsession")
+      (version "1-3")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://aur.archlinux.org/xinit-xsession.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "12nv3qyjhy2l9mcb547f414d8bj79mhdhsra0g8x7x71b1xxl15b"))))
+      (build-system copy-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'patch-xsession-file
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (xinitrc-helper (string-append out "/bin/xinitrcsession-helper")))
+                 (substitute* (string-append out "/share/xsessions/xinitrc.desktop")
+                   (("Exec=xinitrcsession-helper")
+                    (string-append "Exec=" xinitrc-helper)))))))
+         #:install-plan
+         '(("xinitrcsession-helper" "bin/")
+           ("xinitrc.desktop" "share/xsessions/"))))
+      (home-page "https://aur.archlinux.org/packages/xinit-xsession/")
+      (synopsis "Use ~/.xinitrc as an xsession from your display manager")
+      (description
+       "Allows @code{~/.xinitrc} to be run as a session from your display manager.
+Use this package in your system configuration to make this xsession
+available.")
+      (license license:gpl3))))
+
 (define-public xmenu
   (package
     (name "xmenu")
-- 
2.34.1