[PATCH] gnu: Add steam-devices-udev-rules.

  • Done
  • quality assurance status badge
Details
4 participants
  • Morgan.J.Smith
  • John Kehayias
  • Maxime Devos
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Morgan.J.Smith
Severity
normal

Debbugs page

Morgan.J.Smith wrote 3 years ago
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
DM5PR03MB3163E76815AFB6B7B6084160C5799@DM5PR03MB3163.namprd03.prod.outlook.com
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(+)

Toggle diff (33 lines)
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)))
--
2.37.2
John Kehayias wrote 3 years ago
(address . Morgan.J.Smith@outlook.com)(address . 57495@debbugs.gnu.org)
87tu5tntob.fsf@protonmail.com
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:

Toggle quote (19 lines)
> * 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?

Toggle quote (19 lines)
> + (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
Maxime Devos wrote 3 years ago
Re: [bug#57495] [PATCH] gnu: Add steam-devices-udev-rules.
8e455d7c-06d4-ec8a-d50e-3e0b7a5fab76@telenet.be
On 30-08-2022 21:01, Morgan.J.Smith@outlook.com wrote:
Toggle quote (29 lines)
> 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:
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.
Attachment: OpenPGP_signature
Morgan.J.Smith wrote 3 years ago
[PATCH v2] gnu: Add steam-devices-udev-rules.
(address . 57495@debbugs.gnu.org)
DM5PR03MB3163400722CA8BAC8BF75761C5789@DM5PR03MB3163.namprd03.prod.outlook.com
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/games.scm (steam-devices-udev-rules): New variable.
---

I've incorporated both of your suggestions into the following patch


gnu/packages/games.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index fe66343a4c..98e5389903 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -12591,3 +12591,38 @@ (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
+ ;; Last release from 2019-04-10
+ (let ((commit "d87ef558408c5e7a1a793d738db4c9dc2cb5f8fa")
+ (revision "0"))
+ (package
+ (name "steam-devices-udev-rules")
+ (version (git-version "1.0.0.61" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ValveSoftware/steam-devices")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yqigraz9f19018ma5n2pbx7naadh9960lia3z8ayg7vz1fjdl54"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("./" "lib/udev/rules.d"
+ #:include-regexp ("rules$")))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "60-steam-input.rules"
+ (("/bin/sh")
+ (search-input-file inputs "/bin/sh"))
+ (("udevadm")
+ (search-input-file inputs "/bin/udevadm"))))))))
+ (inputs (list eudev))
+ (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))))
--
2.37.2
John Kehayias wrote 3 years ago
(address . Morgan.J.Smith@outlook.com)
87v8pwxq2d.fsf@protonmail.com
On Wed, Aug 31, 2022 at 12:44 PM, Morgan.J.Smith@outlook.com wrote:

Toggle quote (8 lines)
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/games.scm (steam-devices-udev-rules): New variable.
> ---
>
> I've incorporated both of your suggestions into the following patch
>
>
[snip]

LGTM

I checked that it builds and the output looks correct (correct location, took a peek at the udev rules)
Mathieu Othacehe wrote 2 years ago
Re: bug#57495: [PATCH] gnu: Add steam-devices-udev-rules.
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87y1uqynzy.fsf_-_@gnu.org
Applied, thanks to all reviewers :)

Mathieu
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 57495@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57495
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help