Merge pull request #172080 from wentasah/usbrelay-1.0
usbrelay: 0.9 -> 1.0
This commit is contained in:
commit
b196dea22d
|
@ -26,8 +26,7 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
# TODO: Rename to .conf in upcomming release
|
environment.etc."usbrelayd.conf".text = ''
|
||||||
environment.etc."usbrelayd.ini".text = ''
|
|
||||||
[MQTT]
|
[MQTT]
|
||||||
BROKER = ${cfg.broker}
|
BROKER = ${cfg.broker}
|
||||||
CLIENTNAME = ${cfg.clientName}
|
CLIENTNAME = ${cfg.clientName}
|
||||||
|
@ -41,4 +40,8 @@ in
|
||||||
};
|
};
|
||||||
users.groups.usbrelay = { };
|
users.groups.usbrelay = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
maintainers = with lib.maintainers; [ wentasah ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
|
||||||
install -m 644 -D usbrelayd $out/bin/usbrelayd
|
install -m 644 -D usbrelayd $out/bin/usbrelayd
|
||||||
install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service
|
install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service
|
||||||
install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules
|
install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules
|
||||||
|
install -m 644 -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
# TODO for later releases: install -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "USB Relay MQTT service";
|
description = "USB Relay MQTT service";
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, hidapi }:
|
{ stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "usbrelay";
|
pname = "usbrelay";
|
||||||
version = "0.9";
|
version = "1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "darrylb123";
|
owner = "darrylb123";
|
||||||
repo = "usbrelay";
|
repo = "usbrelay";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-bxME4r5W5bZKxMZ/Svi1EenqHKVWIjU6iiKaM8U6lmA=";
|
sha256 = "sha256-5zgpN4a+r0tmw0ISTJM+d9mo+L/qwUvpWPSsykuG0cg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
hidapi
|
hidapi
|
||||||
];
|
];
|
||||||
|
@ -19,6 +23,10 @@ stdenv.mkDerivation rec {
|
||||||
"PREFIX=${placeholder "out"}"
|
"PREFIX=${placeholder "out"}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installManPage usbrelay.1
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Tool to control USB HID relays";
|
description = "Tool to control USB HID relays";
|
||||||
homepage = "https://github.com/darrylb123/usbrelay";
|
homepage = "https://github.com/darrylb123/usbrelay";
|
||||||
|
|
Loading…
Reference in a new issue