teensy-udev-rules: init at version 2022-05-15

Add udev rules for the Teensy family of microcontrollers so that they can be
flashed as non-root users.

+82
+5
nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
··· 305 </listitem> 306 <listitem> 307 <para> 308 There is a new module for the <literal>thunar</literal> 309 program (the Xfce file manager), which depends on the 310 <literal>xfconf</literal> dbus service, and also has a dbus
··· 305 </listitem> 306 <listitem> 307 <para> 308 + Add udev rules for the Teensy family of microcontrollers. 309 + </para> 310 + </listitem> 311 + <listitem> 312 + <para> 313 There is a new module for the <literal>thunar</literal> 314 program (the Xfce file manager), which depends on the 315 <literal>xfconf</literal> dbus service, and also has a dbus
+2
nixos/doc/manual/release-notes/rl-2211.section.md
··· 114 115 - memtest86+ was updated from 5.00-coreboot-002 to 6.00-beta2. It is now the upstream version from https://www.memtest.org/, as coreboot's fork is no longer available. 116 117 - There is a new module for the `thunar` program (the Xfce file manager), which depends on the `xfconf` dbus service, and also has a dbus service and a systemd unit. The option `services.xserver.desktopManager.xfce.thunarPlugins` has been renamed to `programs.thunar.plugins`, and in a future release it may be removed. 118 119 <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
··· 114 115 - memtest86+ was updated from 5.00-coreboot-002 to 6.00-beta2. It is now the upstream version from https://www.memtest.org/, as coreboot's fork is no longer available. 116 117 + - Add udev rules for the Teensy family of microcontrollers. 118 + 119 - There is a new module for the `thunar` program (the Xfce file manager), which depends on the `xfconf` dbus service, and also has a dbus service and a systemd unit. The option `services.xserver.desktopManager.xfce.thunarPlugins` has been renamed to `programs.thunar.plugins`, and in a future release it may be removed. 120 121 <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+34
pkgs/os-specific/linux/teensy-udev-rules/default.nix
···
··· 1 + { lib, stdenv, coreutils }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "teensy-udev-rules"; 5 + version = "2022-05-15"; 6 + 7 + # Source: https://www.pjrc.com/teensy/00-teensy.rules 8 + src = ./teensy.rules; 9 + 10 + dontUnpack = true; 11 + 12 + runtimeDeps = [ coreutils ]; 13 + 14 + installPhase = '' 15 + install -D $src $out/etc/udev/rules.d/70-teensy.rules 16 + substituteInPlace $out/etc/udev/rules.d/70-teensy.rules \ 17 + --replace "/bin/stty" "${coreutils}/bin/stty" 18 + ''; 19 + 20 + meta = with lib; { 21 + homepage = "https://www.pjrc.com/teensy/00-teensy.rules"; 22 + description = '' 23 + udev rules that give non-root users permission to communicate with the 24 + Teensy family of microcontrolers. 25 + 26 + ModemManager (part of NetworkManager) can interfere with USB Serial 27 + devices, which includes the Teensy. See comments in the .rules file (or 28 + this package's homepage) for possible workarounds. 29 + ''; 30 + platforms = platforms.linux; 31 + license = "unknown"; 32 + maintainers = with maintainers; [ aidalgol ]; 33 + }; 34 + }
+39
pkgs/os-specific/linux/teensy-udev-rules/teensy.rules
···
··· 1 + # UDEV Rules for Teensy boards, http://www.pjrc.com/teensy/ 2 + # 3 + # The latest version of this file may be found at: 4 + # http://www.pjrc.com/teensy/00-teensy.rules 5 + # 6 + # This file must be placed at: 7 + # 8 + # /etc/udev/rules.d/00-teensy.rules (preferred location) 9 + # or 10 + # /lib/udev/rules.d/00-teensy.rules (req'd on some broken systems) 11 + # 12 + # To install, type this command in a terminal: 13 + # sudo cp 00-teensy.rules /etc/udev/rules.d/00-teensy.rules 14 + # 15 + # After this file is installed, physically unplug and reconnect Teensy. 16 + # 17 + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" 18 + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789a]*", ENV{MTP_NO_PROBE}="1" 19 + KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666", RUN:="/bin/stty -F /dev/%k raw -echo" 20 + KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666" 21 + SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04*", MODE:="0666" 22 + KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013*", MODE:="0666" 23 + SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013*", MODE:="0666" 24 + 25 + # 26 + # If you share your linux system with other users, or just don't like the 27 + # idea of write permission for everybody, you can replace MODE:="0666" with 28 + # OWNER:="yourusername" to create the device owned by you, or with 29 + # GROUP:="somegroupname" and mange access using standard unix groups. 30 + # 31 + # ModemManager tends to interfere with USB Serial devices like Teensy. 32 + # Problems manifest as the Arduino Serial Monitor missing some incoming 33 + # data, and "Unable to open /dev/ttyACM0 for reboot request" when 34 + # uploading. If you experience these problems, disable or remove 35 + # ModemManager from your system. If you must use a modem, perhaps 36 + # try disabling the "MM_FILTER_RULE_TTY_ACM_INTERFACE" ModemManager 37 + # rule. Changing ModemManager's filter policy from "strict" to "default" 38 + # may also help. But if you don't use a modem, completely removing 39 + # the troublesome ModemManager is the most effective solution.
+2
pkgs/top-level/all-packages.nix
··· 24333 24334 wooting-udev-rules = callPackage ../os-specific/linux/wooting-udev-rules { }; 24335 24336 wpa_supplicant = callPackage ../os-specific/linux/wpa_supplicant { }; 24337 24338 wpa_supplicant_ro_ssids = wpa_supplicant.override {
··· 24333 24334 wooting-udev-rules = callPackage ../os-specific/linux/wooting-udev-rules { }; 24335 24336 + teensy-udev-rules = callPackage ../os-specific/linux/teensy-udev-rules { }; 24337 + 24338 wpa_supplicant = callPackage ../os-specific/linux/wpa_supplicant { }; 24339 24340 wpa_supplicant_ro_ssids = wpa_supplicant.override {