unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "宋文武 via Guix-patches via" <guix-patches@gnu.org>
To: Roman Scherer <roman.scherer@burningswell.com>
Cc: 61458@debbugs.gnu.org
Subject: [bug#61458] [PATCH] services: xorg-wrapper: Support xorg server input
Date: Tue, 07 Mar 2023 09:30:01 +0800	[thread overview]
Message-ID: <871qm1nyau.fsf@envs.net> (raw)
In-Reply-To: <86k00mvgmi.fsf@burningswell.com> (Roman Scherer's message of "Sun, 12 Feb 2023 19:52:40 +0100")

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hello Guix,
>
> I would like to replace the Mesa package in my Xorg configuration. I
> tried to do this with the following snippet:
>
> ```
> (modify-services %desktop-services
>   (slim-service-type config =>
>                      (slim-configuration
>                       (inherit config)
>                       (xorg-configuration
>                        (xorg-configuration
>                         (server (replace-mesa xorg-server)))))))
> ```
>
> But this unfortunately does not work, because the xorg-wrapper uses
> static paths for the mesa, xkbcomp and xkeyboard-config packages in the
> derivation.
>
> The xserver starts now with the replaced mesa, but some paths still
> point to the hard coded packages in Guix itself (and not the
> replacement), which cause some things to not work.
>
> This patch changes this to lookup the paths from the inputs of the
> server field of the xorg-configuration instead. That way the correct
> paths are setup in the xor-wrapper script. If those inputs are not found
> for some reason it falls back to the current behavior, using the
> packages from Guix.
>
> Could you please review this?
>
> Thanks, Roman.

Sorry for a long deley..
>
> From d035c99ed4703da0e3e9b62299c390560c074a17 Mon Sep 17 00:00:00 2001
> From: r0man <roman@burningswell.com>
> Date: Sat, 11 Feb 2023 19:36:16 +0100
> Subject: [PATCH] services: xorg-wrapper: Support xorg server input
>  transformations.

I think it's better add some explaination to commit message like:
The xorg-wrapper uses [...]
This patch [...]

Should be good.
>
> * gnu/services/xorg.scm (xorg-wrapper): Support xorg server input transformations.
> ---
>  gnu/services/xorg.scm | 22 +++++++++++++++++++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
> index 5f073d05d3..92735e6004 100644
> --- a/gnu/services/xorg.scm
> +++ b/gnu/services/xorg.scm
> @@ -355,6 +355,21 @@ (define files
>                                   files)
>                         #t))))
>  
> +(define (xorg-configuration-append-input config input default-input path)
> +  (let ((server (xorg-configuration-server config)))
> +    (file-append (or (lookup-package-direct-input server input) default-input)
> +                 path)))
I'm not sure about the procedure name, maybe add a docstring explain
it's function?


Otherwise, look good to me, thank you!




  reply	other threads:[~2023-03-07  1:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 18:52 [bug#61458] [PATCH] services: xorg-wrapper: Support xorg server input Roman Scherer
2023-03-07  1:30 ` 宋文武 via Guix-patches via [this message]
2023-03-10 15:32   ` Roman Scherer
2023-03-21 19:11 ` [bug#61458] [PATCH v2 0/1] Support xorg server input rewriting Roman Scherer
2023-03-21 19:11   ` [bug#61458] [PATCH v2 1/1] services: xorg-wrapper: " Roman Scherer
2023-03-25  2:11   ` bug#61458: [PATCH] services: xorg-wrapper: Support xorg server input 宋文武 via Guix-patches via
2023-03-25  7:56     ` [bug#61458] " Roman Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qm1nyau.fsf@envs.net \
    --to=guix-patches@gnu.org \
    --cc=61458@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --cc=roman.scherer@burningswell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).