{ lib, stdenvNoCC, fetchFromGitHub, bash, udevCheckHook, nix-update-script, }: stdenvNoCC.mkDerivation { pname = "steam-devices-udev-rules"; version = "1.0.0.61-unstable-2025-09-26"; src = fetchFromGitHub { owner = "ValveSoftware"; repo = "steam-devices"; rev = "d3f7cd6a955d2191800f01d6d2efb2ee196127c5"; hash = "sha256-IMrKU6zyR+oTc4Wqca8JBvxoslKUuz8peHMudfwewf0="; }; nativeBuildInputs = [ udevCheckHook ]; doInstallCheck = true; 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 ]; }; }