eculocate

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit b8a381879e0016e7920cd4583ca9ed8ae291e986
parent 7e149ee542d4c09028f303fa9dd3556c62e17e6d
Author: Daniel Barlow <dan@telent.net>
Date:   Tue, 24 Feb 2026 22:52:37 +0000

installable gtk python "hello world" client

Diffstat:
Mclient/default.nix | 21+++++++++++++++++++--
Aclient/eculocate-gtk | 26++++++++++++++++++++++++++
Mclient/setup.py | 3++-
3 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/client/default.nix b/client/default.nix @@ -1,5 +1,11 @@ -{ lib, - python3Packages +{ + lib, + makeDesktopItem, + python3Packages, + wrapGAppsHook3, + gobject-introspection, + gtk3, + librsvg, }: python3Packages.buildPythonApplication rec { @@ -13,6 +19,17 @@ python3Packages.buildPythonApplication rec { zeroconf bleak ]; + nativeBuildInputs = [ + wrapGAppsHook3 + gobject-introspection + gtk3 + ]; + propagatedBuildInputs = [ + gobject-introspection + gtk3 + librsvg + python3Packages.pygobject3 + ]; postInstall = '' install -Dm644 ${./eculocate.svg} $out/share/icons/hicolor/scalable/apps/eculocate.svg ''; diff --git a/client/eculocate-gtk b/client/eculocate-gtk @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import gi +gi.require_version("Gtk", "3.0") +from gi.repository import Gtk + +import eculocate + + + +class MyWindow(Gtk.Window): + def __init__(self): + super().__init__(title="Hello World") + + self.button = Gtk.Button(label="Click Here") + self.button.connect("clicked", self.on_button_clicked) + self.add(self.button) + + def on_button_clicked(self, widget): + print("Hello World") + + +win = MyWindow() +win.connect("destroy", Gtk.main_quit) +win.show_all() +Gtk.main() diff --git a/client/setup.py b/client/setup.py @@ -4,6 +4,7 @@ setup(name='Eculocate', version='0.7', # Modules to import from other scripts: packages=find_packages(), + py_modules=["eculocate", "ble"], # Executables - scripts=["eculocate.py"], + scripts=["eculocate-gtk"], )