Skip to content

Commit

Permalink
steamPackages.steam: add udev rules
Browse files Browse the repository at this point in the history
(cherry picked from commit 9721604)
  • Loading branch information
Jonathan Ringer committed Apr 25, 2021
1 parent cf8870f commit 8059fbf
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions 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";
Expand Down Expand Up @@ -26,8 +26,16 @@ in stdenv.mkDerivation {
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
# 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
'';

meta = with stdenv.lib; {
Expand Down

0 comments on commit 8059fbf

Please sign in to comment.