Add picotool udev rules
This commit is contained in:
parent
25d49a7a98
commit
747b804b0f
2 changed files with 32 additions and 0 deletions
|
@ -14,6 +14,10 @@ with lib; let
|
|||
inherit (pkgs.stdenv) mkDerivation;
|
||||
inherit lib;
|
||||
};
|
||||
picotoolRules = pkgs.callPackage ./picotool {
|
||||
inherit (pkgs.stdenv) mkDerivation;
|
||||
inherit lib;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.eboskma.base = {
|
||||
|
@ -72,6 +76,7 @@ in
|
|||
packages = [
|
||||
probersRules
|
||||
blink1Rules
|
||||
picotoolRules
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
27
modules/base/picotool/default.nix
Normal file
27
modules/base/picotool/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ mkDerivation, lib }:
|
||||
mkDerivation {
|
||||
pname = "picotool-udev-rules";
|
||||
version = "20220628194715";
|
||||
|
||||
src = ./.;
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", TAG+="uaccess"' > $out/lib/udev/rules.d/70-picotool.rules
|
||||
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000a", TAG+="uaccess"' >> $out/lib/udev/rules.d/70-picotool.rules
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "udev rules for Raspberry Pi picotool";
|
||||
license = licenses.mit;
|
||||
maintainers = [{
|
||||
email = "erwin@datarift.nl";
|
||||
github = "eboskma";
|
||||
name = "Erwin Boskma";
|
||||
}];
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://github.com/raspberrypi/picotool";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue