diff mbox series

[bug#52806,v5] gnu: Add xinitrc-xsession.

Message ID 8jp1iB7YrQ26RetEUuJm06jn0q0xsMCcEiRhKdaD-1X5Febwpb5VDSQHx1OUQ2t0G2s-qBB4QJcNh4YW3ocSlcUEGunRZoX6W0n3YqfGi2o=@protonmail.com
State Accepted
Headers show
Series [bug#52806,v5] gnu: Add xinitrc-xsession. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

John Kehayias Jan. 11, 2022, 10:34 p.m. UTC
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

Comments

John Kehayias Jan. 27, 2022, 3:33 a.m. UTC | #1
Hi Maxime,

Just wanted to see if you got a chance to see the updated patch I sent previously, where I made the change you suggested:

> ‐‐‐‐‐‐‐ 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 _ ...).
>

Was there anything else I should take care of?

Thanks again for the suggestion!

John
M Jan. 27, 2022, 3:56 p.m. UTC | #2
user guix
usertag 52806 + reviewed-looks-good
thanks

John Kehayias schreef op do 27-01-2022 om 03:33 [+0000]:
> Hi Maxime,
> 
> Just wanted to see if you got a chance to see the updated patch I sent previously, where I made the change you suggested:
> 
> > ‐‐‐‐‐‐‐ 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 _ ...).
> > 
> 
> Was there anything else I should take care of?

IIRC, no, the v5 patch appears to be fine, though IIRC I didn't look at
the source code of xinitrc-xsession.

Greetings,
Maxime.
John Kehayias Jan. 28, 2022, 8:47 p.m. UTC | #3
Thanks Maxime!

------- Original Message -------

On Thursday, January 27th, 2022 at 10:56 AM, Maxime Devos wrote:

> user guix
> usertag 52806 + reviewed-looks-good
> thanks
>
> John Kehayias schreef op do 27-01-2022 om 03:33 [+0000]:
>
> > Was there anything else I should take care of?
>
> IIRC, no, the v5 patch appears to be fine, though IIRC I didn't look at
> the source code of xinitrc-xsession.
>

There is not much to the source, mostly it is an easy way to provide an xsession for your xinitrc. So the source is just a desktop file and helper script to execute a user's xinitrc. Basically making it convenient, through having this in your system configuration, to login through a display manager but with the more barebones (or controllable) xinit style. For example, I use this to set up my bare WM (xmonad) the same as I do when I don't run a display manager.

John
M Jan. 28, 2022, 9:34 p.m. UTC | #4
Maxime Devos schreef op do 27-01-2022 om 16:56 [+0100]:
> > [...]
> > Was there anything else I should take care of?
> 
> IIRC, no, the v5 patch appears to be fine, though IIRC I didn't look at
> the source code of xinitrc-xsession.
> 
> Greetings,
> Maxime.

Also, to be clear, I'm not a committer.

Greetings,
Maxime
Liliana Marie Prikler Feb. 4, 2022, 7:52 p.m. UTC | #5
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!
diff mbox series

Patch

From b8344d2876e978d80bf56ba65993c4cf66246dad Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
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 | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index bf24dfa0d9..72e2e37313 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -48,6 +48,7 @@ 
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
+;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -68,9 +69,11 @@  (define-module (gnu packages wm)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #: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 +2320,47 @@  (define-public xclickroot
 button is pressed on the root window.")
     (license license:public-domain)))
 
+(define-public xinitrc-xsession
+  (let ((commit "cbfc77a1ccaf07b7d8a35f4d8007c7102f365374")
+        (revision "0"))
+    (package
+      (name "xinitrc-xsession")
+      (version (git-version "1" revision commit))
+      (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
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'install 'patch-xsession-file
+              (lambda _
+                (let* ((xinitrc-desktop
+                        (string-append #$output "/share/xsessions/xinitrc.desktop"))
+                       (xinitrc-helper
+                        (string-append #$output "/bin/xinitrcsession-helper")))
+                  (substitute* xinitrc-desktop
+                    (("Exec=xinitrcsession-helper")
+                     (string-append "Exec=" xinitrc-helper)))))))
+        #:install-plan
+        #~(list '("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
+       "Xinitrc-xsession allows @code{~/.xinitrc} to be run as a session from your
+display manager.  Make @code{~/.xinitrc} executable and use this package in
+your system configuration have this xsession available to your display
+manager.")
+      (license license:gpl3))))
+
 (define-public xmenu
   (package
     (name "xmenu")
-- 
2.34.0