about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2023-06-30 09:06:48 +0800
committerGitHub <noreply@github.com>2023-06-30 09:06:48 +0800
commit4aff42c720a087e910a758ef52bb4f3f2520ced8 (patch)
treeeb61e590de04cec23861725e9cd308e2a8414dfe /pkgs/os-specific
parentd7a27f31892896029919f71f1d2353bc5147c433 (diff)
parent348dabd375816a0c013170a4761bb43d5730bd5f (diff)
Merge pull request #239974 from keenanweaver/game-devices-udev-rules
game-devices-udev-rules: init at 0.21
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];
+  };
+}