usbrelay: 1.0 -> 1.0.1

+11 -7
-4
nixos/modules/services/hardware/usbrelayd.nix
··· 34 35 services.udev.packages = [ pkgs.usbrelayd ]; 36 systemd.packages = [ pkgs.usbrelayd ]; 37 - users.users.usbrelay = { 38 - isSystemUser = true; 39 - group = "usbrelay"; 40 - }; 41 users.groups.usbrelay = { }; 42 }; 43
··· 34 35 services.udev.packages = [ pkgs.usbrelayd ]; 36 systemd.packages = [ pkgs.usbrelayd ]; 37 users.groups.usbrelay = { }; 38 }; 39
+4 -1
pkgs/os-specific/linux/usbrelay/daemon.nix
··· 1 - { stdenv, usbrelay, python3 }: 2 let 3 python = python3.withPackages (ps: with ps; [ usbrelay-py paho-mqtt ]); 4 in ··· 16 --replace '/usr/sbin/usbrelayd' "$out/bin/usbrelayd" 17 ''; 18 19 buildInputs = [ python ]; 20 21 dontBuild = true; ··· 26 install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service 27 install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules 28 install -m 644 -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example 29 runHook postInstall 30 ''; 31
··· 1 + { stdenv, usbrelay, python3, installShellFiles }: 2 let 3 python = python3.withPackages (ps: with ps; [ usbrelay-py paho-mqtt ]); 4 in ··· 16 --replace '/usr/sbin/usbrelayd' "$out/bin/usbrelayd" 17 ''; 18 19 + nativeBuildInputs = [ installShellFiles ]; 20 + 21 buildInputs = [ python ]; 22 23 dontBuild = true; ··· 28 install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service 29 install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules 30 install -m 644 -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example 31 + installManPage usbrelayd.8 32 runHook postInstall 33 ''; 34
+2 -2
pkgs/os-specific/linux/usbrelay/default.nix
··· 1 { stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }: 2 stdenv.mkDerivation rec { 3 pname = "usbrelay"; 4 - version = "1.0"; 5 6 src = fetchFromGitHub { 7 owner = "darrylb123"; 8 repo = "usbrelay"; 9 rev = version; 10 - sha256 = "sha256-5zgpN4a+r0tmw0ISTJM+d9mo+L/qwUvpWPSsykuG0cg="; 11 }; 12 13 nativeBuildInputs = [
··· 1 { stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }: 2 stdenv.mkDerivation rec { 3 pname = "usbrelay"; 4 + version = "1.0.1"; 5 6 src = fetchFromGitHub { 7 owner = "darrylb123"; 8 repo = "usbrelay"; 9 rev = version; 10 + sha256 = "sha256-2elDrO+WaaRYdTrG40Ez00qSsNVQjXE6GdOJbWPfugE="; 11 }; 12 13 nativeBuildInputs = [
+4
pkgs/os-specific/linux/usbrelay/python.nix
··· 4 pname = "usbrelay_py"; 5 inherit (usbrelay) version src; 6 7 buildInputs = [ usbrelay ]; 8 9 pythonImportsCheck = [ "usbrelay_py" ];
··· 4 pname = "usbrelay_py"; 5 inherit (usbrelay) version src; 6 7 + preConfigure = '' 8 + cd usbrelay_py 9 + ''; 10 + 11 buildInputs = [ usbrelay ]; 12 13 pythonImportsCheck = [ "usbrelay_py" ];
+1
pkgs/os-specific/linux/usbrelay/test.nix
··· 42 }; 43 44 testScript = '' 45 if os.waitstatus_to_exitcode(os.system("lsusb -d 16c0:05df")) != 0: 46 print("No USB relay detected, skipping test") 47 import sys
··· 42 }; 43 44 testScript = '' 45 + import os 46 if os.waitstatus_to_exitcode(os.system("lsusb -d 16c0:05df")) != 0: 47 print("No USB relay detected, skipping test") 48 import sys