diff options
author | Martino Fontana <tinozzo123@tutanota.com> | 2022-08-22 15:54:01 +0200 |
---|---|---|
committer | Martino Fontana <tinozzo123@tutanota.com> | 2022-08-23 17:25:30 +0200 |
commit | b66cc6ba241416fdaa33b305700eebb39f84bf64 (patch) | |
tree | 732b445e4069c1f935c119e869301abb30ebb1c1 /pkgs/applications/emulators | |
parent | 6654c6aae112967b1ec4dcf6165a1754f4ddd98f (diff) |
rpcs3: add udev rules
Diffstat (limited to 'pkgs/applications/emulators')
4 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/rpcs3/99-ds3-controllers.rules b/pkgs/applications/emulators/rpcs3/99-ds3-controllers.rules new file mode 100644 index 0000000000000..a4f32124d970b --- /dev/null +++ b/pkgs/applications/emulators/rpcs3/99-ds3-controllers.rules @@ -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" diff --git a/pkgs/applications/emulators/rpcs3/99-ds4-controllers.rules b/pkgs/applications/emulators/rpcs3/99-ds4-controllers.rules new file mode 100644 index 0000000000000..6061debfbff8f --- /dev/null +++ b/pkgs/applications/emulators/rpcs3/99-ds4-controllers.rules @@ -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" diff --git a/pkgs/applications/emulators/rpcs3/99-dualsense-controllers.rules b/pkgs/applications/emulators/rpcs3/99-dualsense-controllers.rules new file mode 100644 index 0000000000000..fb3ed3eec3f5b --- /dev/null +++ b/pkgs/applications/emulators/rpcs3/99-dualsense-controllers.rules @@ -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" diff --git a/pkgs/applications/emulators/rpcs3/default.nix b/pkgs/applications/emulators/rpcs3/default.nix index 46311c3ed45ba..3609b9492da4d 100644 --- a/pkgs/applications/emulators/rpcs3/default.nix +++ b/pkgs/applications/emulators/rpcs3/default.nix @@ -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/"; |