From 972160461015767a1fba93114e1756e7e9645d98 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 23 Dec 2020 08:54:18 -0800 Subject: [PATCH] steamPackages.steam: add udev rules --- pkgs/games/steam/steam.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/games/steam/steam.nix b/pkgs/games/steam/steam.nix index fa99f39d68c..ed837c9f0bd 100644 --- a/pkgs/games/steam/steam.nix +++ b/pkgs/games/steam/steam.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, runtimeShell, traceDeps ? false}: +{ stdenv, fetchurl, runtimeShell, traceDeps ? false, bash }: let traceLog = "/tmp/steam-trace-dependencies.log"; @@ -27,6 +27,12 @@ in stdenv.mkDerivation { chmod +x $out/bin/steamdeps ''} + # install udev rules + mkdir -p $out/etc/udev/rules.d/ + cp ./subprojects/steam-devices/*.rules $out/etc/udev/rules.d/ + substituteInPlace $out/etc/udev/rules.d/60-steam-input.rules \ + --replace "/bin/sh" "${bash}/bin/bash" + # this just installs a link, "steam.desktop -> /lib/steam/steam.desktop" rm $out/share/applications/steam.desktop sed -e 's,/usr/bin/steam,steam,g' steam.desktop > $out/share/applications/steam.desktop