default.nix (1148B)
1 { 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 gtk3, 6 gobject-introspection, 7 wrapGAppsHook, 8 }: 9 10 python3Packages.buildPythonApplication { 11 pname = "mqtt-stats"; 12 version = "0-unstable-2023-07-13"; 13 format = "other"; 14 15 src = fetchFromGitHub { 16 owner = "gambitcomminc"; 17 repo = "mqtt-stats"; 18 rev = "cd7378df22dce40d4a790e4d4b58b187c141b1dc"; 19 hash = "sha256-LkgRubf+Iy+qmoLudGzHjbtzOyKJlxmj5OqxxCIM/2o="; 20 }; 21 22 postPatch = '' 23 substituteInPlace mqtt-stats.py \ 24 --replace-fail "glade_path = dir_path" "glade_path = \"$out/share/mqtt-stats\"" 25 ''; 26 27 dontUseSetuptoolsBuild = true; 28 dontUseSetuptoolsCheck = true; 29 30 nativeBuildInputs = [ 31 gobject-introspection 32 wrapGAppsHook 33 ]; 34 35 dependencies = with python3Packages; [ 36 paho-mqtt 37 pygobject3 38 gtk3 39 ]; 40 41 installPhase = '' 42 install -Dm755 mqtt-stats.py $out/bin/mqtt-stats 43 install -Dm644 mqtt-stats.glade -t $out/share/mqtt-stats 44 ''; 45 46 meta = { 47 description = "MQTT Topic Statistics"; 48 homepage = "https://github.com/gambitcomminc/mqtt-stats"; 49 license = lib.licenses.lgpl3; 50 maintainers = [ lib.maintainers.sikmir ]; 51 }; 52 }