diff --git a/pkgs/os-specific/linux/usb-blaster-udev-rules/default.nix b/pkgs/os-specific/linux/usb-blaster-udev-rules/default.nix new file mode 100644 index 000000000000..d04c8ddb9398 --- /dev/null +++ b/pkgs/os-specific/linux/usb-blaster-udev-rules/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenvNoCC }: + +stdenvNoCC.mkDerivation rec { + name = "usb-blaster-udev-rules"; + + udevRules = ./usb-blaster.rules; + dontUnpack = true; + + installPhase = '' + install -Dm 644 "${udevRules}" "$out/lib/udev/rules.d/51-usbblaster.rules" + ''; + + meta = with lib; { + description = "udev rules that give NixOS permission to communicate with usb blasters"; + longDescription = '' + udev rules that give NixOS permission to communicate with usb blasters. + To use it under NixOS, add + + services.udev.packages = [ pkgs.usb-blaster-udev-rules ]; + + to the system configuration. + ''; + license = licenses.free; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/usb-blaster-udev-rules/usb-blaster.rules b/pkgs/os-specific/linux/usb-blaster-udev-rules/usb-blaster.rules new file mode 100644 index 000000000000..0add604ee819 --- /dev/null +++ b/pkgs/os-specific/linux/usb-blaster-udev-rules/usb-blaster.rules @@ -0,0 +1,8 @@ +# USB-Blaster +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", TAG+="uaccess" +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", TAG+="uaccess" +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", TAG+="uaccess" + +# USB-Blaster II +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", TAG+="uaccess" +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", TAG+="uaccess" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7ff11e184f8..10c83a49f723 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34424,6 +34424,8 @@ with pkgs; quartus-prime-lite = callPackage ../applications/editors/quartus-prime {}; + usb-blaster-udev-rules = callPackage ../os-specific/linux/usb-blaster-udev-rules {}; + go-license-detector = callPackage ../development/tools/misc/go-license-detector { }; hashdeep = callPackage ../tools/security/hashdeep { };