diff --git a/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules b/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules new file mode 100644 index 000000000000..ab07de99718b --- /dev/null +++ b/pkgs/os-specific/linux/numworks-udev-rules/50-numworks-calculator.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="a291", TAG+="uaccess" +SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", TAG+="uaccess" diff --git a/pkgs/os-specific/linux/numworks-udev-rules/default.nix b/pkgs/os-specific/linux/numworks-udev-rules/default.nix new file mode 100644 index 000000000000..4a123b202730 --- /dev/null +++ b/pkgs/os-specific/linux/numworks-udev-rules/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "numworks-udev-rules"; + version = "unstable-2020-08-31"; + + udevRules = ./50-numworks-calculator.rules; + dontUnpack = true; + + installPhase = '' + install -Dm 644 "${udevRules}" "$out/lib/udev/rules.d/50-numworks-calculator.rules" + ''; + + meta = with stdenv.lib; { + description = "Udev rules for Numworks calculators"; + homepage = "https://numworks.com"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ shamilton ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/numworks-udev-rules/update.sh b/pkgs/os-specific/linux/numworks-udev-rules/update.sh new file mode 100755 index 000000000000..3949f6fd8f41 --- /dev/null +++ b/pkgs/os-specific/linux/numworks-udev-rules/update.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +wget -O 50-numworks-calculator.rules "https://workshop.numworks.com/files/drivers/linux/50-numworks-calculator.rules" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 363d2aa84b01..b12776d3bce6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2151,6 +2151,8 @@ in numatop = callPackage ../os-specific/linux/numatop { }; + numworks-udev-rules = callPackage ../os-specific/linux/numworks-udev-rules { }; + iio-sensor-proxy = callPackage ../os-specific/linux/iio-sensor-proxy { }; ipvsadm = callPackage ../os-specific/linux/ipvsadm { };