{ lib, python3, ... }: python3.pkgs.buildPythonApplication { pname = "hhstream"; version = "0.1.0"; pyproject = true; src = ../.; build-system = [ python3.pkgs.setuptools ]; # `hhstream-pointer` is a Wayland client, so it needs libwayland's # marshalling; and it resolves keysym names against the XKB layout it # uploads, so it needs xkbcommon. # # Neither protocol XML is a build input: both generated modules are vendored # under src/hhstream_pointer/_protocol, so a checkout builds without a code # generator. See that package's docstring for why, and # hhstream_pointer._protocol.regenerate for how to refresh them -- including # the note that virtual-keyboard-unstable-v1.xml is not in wayland-protocols # or wlr-protocols in this nixpkgs and comes from pkgs.hyprland.src. dependencies = [ python3.pkgs.pywayland python3.pkgs.xkbcommon ]; # Unit tests are wired up in the flake's `checks` so they can run without # installing the package; see docs/CONTRACT.md. doCheck = false; # Cheap proof that the vendored protocols still bind against this pywayland: # importing each runs the scanner-generated `_gen_c()` for its interfaces. pythonImportsCheck = [ "hhstream_pointer.ops" "hhstream_pointer.keymap" "hhstream_pointer._protocol.wlr_virtual_pointer_unstable_v1" "hhstream_pointer._protocol.virtual_keyboard_unstable_v1" # The web app. Importing the server pulls in the router, the publisher and # the pages; the phrase generator's wordlist is checked by the unit suite, # which reads the *installed* package. "hhstream_live.server" ]; meta = { description = "Publish a headless Hyprland session's frames on a Unix socket"; license = lib.licenses.mit; mainProgram = "hhstream-server"; }; }