{ description = "Stream a headless Hyprland session to a persistent Unix socket"; # Matches the nixpkgs this was developed against; consumers can override with # inputs.nixpkgs.follows = "nixpkgs" and nothing breaks. inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; outputs = { self, nixpkgs, ... }: let systems = [ "x86_64-linux" "aarch64-linux" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f (import nixpkgs { inherit system; })); # `checks` needs the system name as well as the package set, to reach # self.packages.; forAllSystems only hands over pkgs. forAllSystems' = f: nixpkgs.lib.genAttrs systems (system: f { inherit system; pkgs = import nixpkgs { inherit system; }; }); in { packages = forAllSystems (pkgs: rec { hhstream = pkgs.callPackage ./nix/package.nix {}; default = hhstream; }); nixosModules = rec { hyprland-headless-stream = import ./nix/module.nix; default = hyprland-headless-stream; }; # Unit tests + the two VM integration tests. See checks/default.nix and # README.dev.md; the interface they assert is docs/CONTRACT.md. checks = forAllSystems' ({ pkgs, system }: import ./checks { inherit pkgs self system; }); devShells = forAllSystems (pkgs: { default = pkgs.mkShell { packages = with pkgs; [ python3 python3.pkgs.pytest git tmux jq hyprland grim ffmpeg ]; shellHook = '' export PYTHONPATH="$PWD/src''${PYTHONPATH:+:$PYTHONPATH}" echo "hhstream dev shell -- python $(python3 --version 2>&1 | cut -d' ' -f2)" ''; }; }); formatter = forAllSystems (pkgs: pkgs.alejandra); }; }