Skip to content

Commit

Permalink
steam-devices-udev-rules: init at 1.0.0.61-unstable-2024-05-22; nixos…
Browse files Browse the repository at this point in the history
…/hardware.steam-hardware: use steam-devices-udev-rules (#363563)
  • Loading branch information
wolfgangwalther authored Dec 15, 2024
2 parents e028379 + 92b3ce1 commit df92923
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/hardware/steam-hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in

config = lib.mkIf cfg.enable {
services.udev.packages = [
pkgs.steam-unwrapped
pkgs.steam-devices-udev-rules
];

# The uinput module needs to be loaded in order to trigger the udev rules
Expand Down
39 changes: 39 additions & 0 deletions pkgs/by-name/st/steam-devices-udev-rules/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
bash,
nix-update-script,
}:

stdenvNoCC.mkDerivation {
pname = "steam-devices-udev-rules";
version = "1.0.0.61-unstable-2024-05-22";

src = fetchFromGitHub {
owner = "ValveSoftware";
repo = "steam-devices";
rev = "e2971e45063f6b327ccedbf18e168bda6749155c";
hash = "sha256-kBqWw3TlCSWS7gJXgza2ghemypQ0AEg7NhWqAFnal04=";
};

installPhase = ''
runHook preInstall
mkdir -p $out/lib/udev/rules.d/
cp *.rules $out/lib/udev/rules.d/
substituteInPlace $out/lib/udev/rules.d/*.rules --replace-warn "/bin/sh" "${bash}/bin/sh"
runHook postInstall
'';

passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

meta = with lib; {
description = "Udev rules list for gaming devices";
homepage = "https://github.com/ValveSoftware/steam-devices";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ azuwis ];
};
}

0 comments on commit df92923

Please sign in to comment.