-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kiosk development environment for macOS #167
base: main
Are you sure you want to change the base?
Conversation
Executing another bash inside the shell hook seems to break running commands with `nix-shell --run`, something we assumed to work in the CI configuration. It seems that the Qt wrapper is already set up at least in modern Nixpkgs, so we can simply remove the code for spawning the wrapped bash.
We previously added support for using the kiosk without connman installed, but it still crashed when started on systems without DBus (i.e. any non-Linux platform). With this change we add a stub implementation of the core proxy abstraction, which is going to provide safe no-op responses on non-Linux platforms, allowing to use the kiosk, albeit without proxy support.
To avoid pulling in dbus stuff on MacOS altogether.
This sets up a development environment for the kiosk on macOS, as the default nix-shell is currently broken due to upstream issues with the `pyqt6-webengine` package. The environment is managed using virtualenv and the `poetry` package manager instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
One small suggestion after code review. I am still going to perform practical tests.
kiosk/kiosk_browser/main_widget.py
Outdated
if platform.system() in ['Darwin']: | ||
from kiosk_browser.proxy import Proxy | ||
import os | ||
system = System(name = "PlayOS", | ||
version = os.getenv("PLAYOS_VERSION","1.0.0-dev")) | ||
else: | ||
from kiosk_browser.dbus_proxy import DBusProxy as Proxy | ||
system = System() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we moved this branching to the system
module/System
class?
It could offer something like a def infer() -> System
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this?
Yay! Works on my machine! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to have found a problem on Linux, which is due to the Qt6 migration, not this PR. I am going to open a PR against the release branch. Otherwise this also looks good to me. Looks like a one line fix, which we can then apply here. |
Follow up on #159 to make the kiosk run without DBus.
The pyqt webengine bindings in nixpkgs are currently broken on darwin, so I created a separate development shell for macOS which makes use of virtualenv and poetry to manage dependencies.
I'm requesting two reviews to test on both nixOS and macOS.
To run the kiosk on macOS:
Checklist
[ ] Changelog updated