Subject: [bug#57495] [PATCH] gnu: Add steam-devices-udev-rules.

From: Maxime Devos <[email-masked]>
Date: Wed, 31 Aug 2022 17:55:41 +0200

On 30-08-2022 21:01, [email-masked] wrote:
> From: Morgan Smith <[email-masked]>
>
> * gnu/packages/games.scm (steam-devices-udev-rules): New variable.
> ---
>   gnu/packages/games.scm | 23 +++++++++++++++++++++++
>   1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index fe66343a4c..f8c6b86cf7 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -12591,3 +12591,26 @@ (define-public freerct
>   Should they go unwise, a theme park plunge into chaos with vandalizing guests
>   and unsafe rides.  Which path will you take?")
>       (license license:gpl2)))
> +
> +(define-public steam-devices-udev-rules
> +  (package
> +    (name "steam-devices-udev-rules")
> +    (version "1.0.0.61")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/ValveSoftware/steam-devices")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "1m4zcrz83p41lz7wxzqc62fsx00rfrai996psfjv7vjvjlyqj0mx"))))

I have taken a look at the rules, and noticed:

https://github.com/ValveSoftware/steam-devices/blob/d87ef558408c5e7a1a793d738db4c9dc2cb5f8fa/60-steam-input.rules#L55

KERNEL=="input*", ATTRS{name}=="Lic Pro Controller", 
RUN{program}+="/bin/sh -c 'udevadm test-builtin uaccess 
/sys/%p/../../hidraw/hidraw*'"

/bin/sh and udevadm will need to patched (with substitute*) to guarantee 
that sh and udevadm will be found.

Greetings,
Maxime.