about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorKeenan Weaver <keenanweaver@protonmail.com>2023-06-26 12:13:21 -0500
committerKeenan Weaver <keenanweaver@protonmail.com>2023-06-29 09:19:19 -0500
commit33d5a0fa90fbff0af7d1c5e05544284f4b53f5e3 (patch)
tree34f9abaf4386e1a475a28377206f0106087af771 /pkgs/os-specific
parentcdefe1d0830ccac378c48eeed795860cf0ded9c3 (diff)
game-devices-udev-rules: init at 0.21
game-devices-udev-rules: add longDescription

game-devices-udev-rules: consolidate to one command

Co-authored-by: Nick Cao <nickcao@nichi.co>

game-devices-udev-rules: fix indentation
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/game-devices-udev-rules/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/game-devices-udev-rules/default.nix b/pkgs/os-specific/linux/game-devices-udev-rules/default.nix
new file mode 100644
index 0000000000000..103eb6c2ffb17
--- /dev/null
+++ b/pkgs/os-specific/linux/game-devices-udev-rules/default.nix
@@ -0,0 +1,37 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitea,
+}:
+stdenv.mkDerivation rec {
+  pname = "game-devices-udev-rules";
+  version = "0.21";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "fabiscafe";
+    repo = "game-devices-udev";
+    rev = version;
+    hash = "sha256-Yy91yDF5BSDTTlr/Pj8e0UklPooEdzvRW8mkhdHtHVo=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm444 -t "$out/lib/udev/rules.d" *.rules
+    runHook postInstall
+  '';
+
+  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];
+  };
+}