about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix b/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix
index 31d6566a4214..86ed8b11acf9 100644
--- a/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix
+++ b/nixpkgs/pkgs/development/tools/misc/usbsdmux/default.nix
@@ -9,9 +9,20 @@ python3Packages.buildPythonApplication rec {
     sha256 = "sha256-OtGgToDGUr6pBu9+LS/DxaYw/9+Pd6jPhxVDAM22HB4=";
   };
 
+  # Remove the wrong GROUP=plugdev.
+  # The udev rule already has TAG+="uaccess", which is sufficient.
+  postPatch = ''
+    substituteInPlace contrib/udev/99-usbsdmux.rules \
+      --replace-fail 'TAG+="uaccess", GROUP="plugdev"' 'TAG+="uaccess"'
+  '';
+
   # usbsdmux is not meant to be used as an importable module and has no tests
   doCheck = false;
 
+  postInstall = ''
+    install -Dm0444 -t $out/lib/udev/rules.d/ contrib/udev/99-usbsdmux.rules
+  '';
+
   meta = with lib; {
     description = "Control software for the LXA USB-SD-Mux";
     homepage = "https://github.com/linux-automation/usbsdmux";