steam-devices-udev-rules: init at 1.0.0.61-unstable-2024-05-22; nixos/hardware.steam-hardware: use steam-devices-udev-rules (#363563)

This commit is contained in:
Wolfgang Walther 2024-12-15 20:02:56 +01:00 committed by GitHub
commit df929235ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 1 deletions

View File

@ -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

View File

@ -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 ];
};
}