Files
lg-smtv-mcp/flake.nix
T
kiskaadee 35a66bd456 test(config): add Nix packaging, pyproject, and Red-phase config/error tests
- flake.nix: expose packages.default (buildPythonApplication) and expand devShell with mcp, asyncssh, uvicorn, httpx, pytest, pytest-asyncio, and PYTHONPATH shellHook
- pyproject.toml: configure setuptools build-system, project metadata/dependencies, lg-smtv-mcp script entrypoint, pytest asyncio/pythonpath, and pyright include paths
- tests/test_config.py: add Red-phase unit tests for ErrorCode, TvError, load_config(), .env fallback, validation, ALLOWED_HOSTS, require_bearer_token(), and require_mac()
2026-11-15 10:51:07 -05:00

49 lines
1.1 KiB
Nix

{
description = "LG Smart TV (webOS) MCP server and testing environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
pythonEnv = pkgs.python3.withPackages (ps: [
ps.websockets
ps.mcp
ps.asyncssh
ps.uvicorn
ps.httpx
ps.pytest
ps.pytest-asyncio
]);
in
{
packages.${system}.default = pkgs.python3Packages.buildPythonApplication {
pname = "lg-smtv-mcp";
version = "0.1.0";
src = ./.;
pyproject = true;
build-system = [ pkgs.python3Packages.setuptools ];
dependencies = with pkgs.python3Packages; [
websockets
mcp
asyncssh
uvicorn
];
};
devShells.${system}.default = pkgs.mkShell {
packages = [
pythonEnv
pkgs.pyright
pkgs.ruff
];
shellHook = ''
export PYTHONPATH="$PWD/src:${PYTHONPATH:-}"
'';
};
};
}