3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #47455 from nyanloutre/steamPackages.steam-udev

steamPackages.steam: add udev rules and update to 1.0.0.56
This commit is contained in:
Jörg Thalheim 2018-10-02 00:55:41 +01:00 committed by GitHub
commit bc0d87a4f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 7 deletions

View file

@ -413,11 +413,8 @@ packageOverrides = pkgs: {
in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
<programlisting>hardware.pulseaudio.support32Bit = true;</programlisting>
if you are using PulseAudio - this will enable 32bit ALSA apps integration.
To use the Steam controller, you need to add
<programlisting>services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
KERNEL=="uinput", MODE="0660", GROUP="users", OPTIONS+="static_node=uinput"
'';</programlisting>
To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
<programlisting>hardware.steam-hardware.enable = true;</programlisting>
to your configuration.
</para>
</section>

View file

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hardware.steam-hardware;
in
{
options.hardware.steam-hardware = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive";
};
};
config = mkIf cfg.enable {
services.udev.packages = [
pkgs.steamPackages.steam
];
};
}

View file

@ -46,6 +46,7 @@
./hardware/opengl.nix
./hardware/pcmcia.nix
./hardware/raid/hpsa.nix
./hardware/steam-hardware.nix
./hardware/usb-wwan.nix
./hardware/onlykey.nix
./hardware/video/amdgpu.nix

View file

@ -2,14 +2,14 @@
let
traceLog = "/tmp/steam-trace-dependencies.log";
version = "1.0.0.51";
version = "1.0.0.56";
in stdenv.mkDerivation rec {
name = "steam-original-${version}";
src = fetchurl {
url = "http://repo.steampowered.com/steam/pool/steam/s/steam/steam_${version}.tar.gz";
sha256 = "1ghrfznm9rckm8v87zvh7hx820r5pp7sq575wxwq0fncbyq6sxmz";
sha256 = "01jgp909biqf4rr56kb08jkl7g5xql6r2g4ch6lc71njgcsbn5fs";
};
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
@ -25,6 +25,8 @@ in stdenv.mkDerivation rec {
EOF
chmod +x $out/bin/steamdeps
''}
install -d $out/lib/udev/rules.d
install -m644 lib/udev/rules.d/*.rules $out/lib/udev/rules.d
'';
meta = with stdenv.lib; {