diff mbox series

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

Message ID DM5PR03MB3163E76815AFB6B7B6084160C5799@DM5PR03MB3163.namprd03.prod.outlook.com
State Accepted
Headers show
Series [bug#57495] gnu: Add steam-devices-udev-rules. | expand

Checks

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

Commit Message

Morgan Smith Aug. 30, 2022, 7:01 p.m. UTC
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/games.scm (steam-devices-udev-rules): New variable.
---
 gnu/packages/games.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

John Kehayias Aug. 31, 2022, 12:27 a.m. UTC | #1
Hello,

Thanks for submitting this here! I've been grabbing these files directly
in my system configuration to use the udev rules and never got around to
making a proper package.

Overall LGTM (but did not try out this package), with one minor comment:

On Tue, Aug 30, 2022 at 03:01 PM, Morgan wrote:

> * 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")

This tag is from 3 years ago now. While this is the latest tag/release,
there have been commits more recently than that. Considering these will
mostly be for adding/tweaking hardware rule, personally I would like
this to reflect the most recent commit to be the most useful. This is
from a year ago now, so it seems the timeline for a release is probably
"Valve time" (aka I'm not holding my breath).

What do you think?

> +    (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"))))
> +    (build-system copy-build-system)
> +    (arguments
> +     '(#:install-plan '(("./" "lib/udev/rules.d"
> +                         #:include-regexp ("rules$")))))
> +    (home-page "https://github.com/ValveSoftware/steam-devices")
> +    (synopsis "udev rules for game controllers and virtual reality devices")
> +    (description
> +     "Provides a set of udev rules for game controllers and virtual reality devices.")
> +    (license license:expat)))

Thanks!
John
M Aug. 31, 2022, 3:55 p.m. UTC | #2
On 30-08-2022 21:01, Morgan.J.Smith@outlook.com wrote:
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * 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.
diff mbox series

Patch

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"))))
+    (build-system copy-build-system)
+    (arguments
+     '(#:install-plan '(("./" "lib/udev/rules.d"
+                         #:include-regexp ("rules$")))))
+    (home-page "https://github.com/ValveSoftware/steam-devices")
+    (synopsis "udev rules for game controllers and virtual reality devices")
+    (description
+     "Provides a set of udev rules for game controllers and virtual reality devices.")
+    (license license:expat)))