rpcs3: add udev rules

This commit is contained in:
Martino Fontana 2022-08-22 15:54:01 +02:00
parent 6654c6aae1
commit b66cc6ba24
4 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# DualShock 3 over USB
KERNEL=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE="0666"
# DualShock 3 over Bluetooth
KERNEL=="hidraw*", KERNELS=="*054C:0268*", MODE="0666"

View file

@ -0,0 +1,14 @@
# DualShock 4 over USB
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
# DualShock 4 Wireless Adapter over USB
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"
# DualShock 4 Slim over USB
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
# DualShock 4 over Bluetooth
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"
# DualShock 4 Slim over Bluetooth
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"

View file

@ -0,0 +1,5 @@
# PS5 DualSense controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", MODE="0660", TAG+="uaccess"
# PS5 DualSense controller over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660", TAG+="uaccess"

View file

@ -70,6 +70,13 @@ gcc11Stdenv.mkDerivation {
++ lib.optional alsaSupport alsa-lib
++ lib.optional waylandSupport wayland;
postInstall = ''
# Taken from https://wiki.rpcs3.net/index.php?title=Help:Controller_Configuration
install -D ${./99-ds3-controllers.rules} $out/etc/udev/rules.d/99-ds3-controllers.rules
install -D ${./99-ds4-controllers.rules} $out/etc/udev/rules.d/99-ds4-controllers.rules
install -D ${./99-dualsense-controllers.rules} $out/etc/udev/rules.d/99-dualsense-controllers.rules
'';
meta = with lib; {
description = "PS3 emulator/debugger";
homepage = "https://rpcs3.net/";