nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 48be6be9e818af4b1a16107a3526689977194aa6
parent fc699ac5afbb302ebbbe35702da2334e045e4af9
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sat, 28 Oct 2023 17:11:52 +0400

Add mqtt-launcher

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/mqtt/mqtt-launcher/default.nix | 30++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -410,6 +410,7 @@ lib.makeScope newScope ( mqtt-benchmark = callPackage ./mqtt/mqtt-benchmark { }; mqtt-cli = callPackage ./mqtt/mqtt-cli { }; mqtt-explorer = callPackage ./mqtt/mqtt-explorer { }; + mqtt-launcher = callPackage ./mqtt/mqtt-launcher { }; mqtt-proxy = callPackage ./mqtt/mqtt-proxy { }; mqtt-shell = callPackage ./mqtt/mqtt-shell { }; mqtt-to-influxdb = callPackage ./mqtt/mqtt-to-influxdb { }; diff --git a/pkgs/mqtt/mqtt-launcher/default.nix b/pkgs/mqtt/mqtt-launcher/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonApplication rec { + pname = "mqtt-launcher"; + version = "2021-09-17"; + format = "other"; + + src = fetchFromGitHub { + owner = "jpmens"; + repo = "mqtt-launcher"; + rev = "bce7a5b320e7b81cfbb904d70033b9998f70e232"; + hash = "sha256-FEKvlED/Sgcr7vBa8HW2N7mapmARiemcJ22zwuTwORw="; + }; + + propagatedBuildInputs = with python3Packages; [ paho-mqtt ]; + + dontUseSetuptoolsBuild = true; + dontUseSetuptoolsCheck = true; + + postInstall = '' + install -Dm755 mqtt-launcher.py $out/bin/mqtt-launcher + ''; + + meta = with lib; { + description = "Execute shell commands triggered by published MQTT messages"; + inherit (src.meta) homepage; + license = licenses.free; + maintainers = with maintainers; [ sikmir ]; + }; +}