2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitea
|
|
|
|
, bash
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "game-devices-udev-rules";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.23";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "fabiscafe";
|
|
|
|
repo = "game-devices-udev";
|
|
|
|
rev = finalAttrs.version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-dWWo3qXnxdLP68NuFKM4/Cw5yE6uAsWzj0vZa9UTT0U=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 -t "$out/lib/udev/rules.d" *.rules
|
|
|
|
substituteInPlace $out/lib/udev/rules.d/71-powera-controllers.rules \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "/bin/sh" "${bash}/bin/bash"
|
2023-07-15 17:15:38 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Udev rules to make supported controllers available with user-grade permissions";
|
|
|
|
homepage = "https://codeberg.org/fabiscafe/game-devices-udev";
|
|
|
|
license = licenses.mit;
|
|
|
|
longDescription = ''
|
|
|
|
These udev rules are intended to be used as a package under 'services.udev.packages'.
|
|
|
|
They will not be activated if installed as 'environment.systemPackages' or 'users.user.<user>.packages'.
|
|
|
|
|
|
|
|
Additionally, you may need to enable 'hardware.uinput'.
|
|
|
|
'';
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ keenanweaver ];
|
|
|
|
};
|
|
|
|
})
|