nur-packages

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

commit 7fc95050d1f2369b39e5a7c67388ddf1390d94cf
parent 7c503051a5299d0408479dca44580a44567b76db
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sun, 26 Jul 2026 18:07:01 +0400

Add mqtt-load-simulator

Diffstat:
Apkgs/by-name/mq/mqtt-load-simulator/package.nix | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+), 0 deletions(-)

diff --git a/pkgs/by-name/mq/mqtt-load-simulator/package.nix b/pkgs/by-name/mq/mqtt-load-simulator/package.nix @@ -0,0 +1,52 @@ +{ + lib, + stdenv, + fetchFromGitHub, + qt5, + qmqtt, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "mqtt-load-simulator"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "halfgaar"; + repo = "MqttLoadSimulator"; + tag = "v${finalAttrs.version}"; + hash = "sha256-XXU5ghCD2rRrZArVzi97oZukCWYGgpXLNhUAztFeyjw="; + }; + + postPatch = '' + sed -i "23i typedef unsigned int uint;" clientnumberpool.h + substituteInPlace MqttLoadSimulator.pro \ + --replace-fail "QT += network qmqtt" "QT += network" \ + --replace-fail "/opt" "$out" + cat >> MqttLoadSimulator.pro <<"EOF" + LIBS += -L${qmqtt}/lib -lqmqtt + EOF + ''; + + sourceRoot = "${finalAttrs.src.name}/MqttLoadSimulator"; + + nativeBuildInputs = [ + qt5.qmake + qt5.wrapQtAppsHook + ]; + + buildInputs = [ (qmqtt.override { qt6 = qt5; }) ]; + + postInstall = '' + mv $out/MqttLoadSimulator/* $out + rm -r $out/MqttLoadSimulator + ''; + + meta = { + description = "Simulate MQTT load / MQTT stress tester"; + homepage = "https://github.com/halfgaar/MqttLoadSimulator"; + license = lib.licenses.gpl2Only; + maintainers = [ lib.maintainers.sikmir ]; + platforms = lib.platforms.unix; + mainProgram = "MqttLoadSimulator"; + }; +})