mcp-nixos: 1.0.0 -> 1.0.1 https://github.com/utensils/mcp-nixos/releases/tag/v1.0.1

+14 -14
+9 -6
pkgs/by-name/mc/mcp-nixos/package.nix
··· 6 7 python3Packages.buildPythonApplication rec { 8 pname = "mcp-nixos"; 9 - version = "1.0.0"; 10 pyproject = true; 11 12 src = fetchFromGitHub { 13 owner = "utensils"; 14 repo = "mcp-nixos"; 15 tag = "v${version}"; 16 - hash = "sha256-NwP+zM1VGLOzIm+mLZVK9/9ImFwuiWhRJ9QK3hGpQsY="; 17 }; 18 19 patches = [ ··· 25 26 dependencies = with python3Packages; [ 27 beautifulsoup4 28 mcp 29 requests 30 ]; 31 32 nativeCheckInputs = with python3Packages; [ 33 anthropic ··· 43 44 disabledTestPaths = [ 45 # Require network access 46 - "tests/test_nixhub_evals.py" 47 - "tests/test_mcp_behavior_evals.py" 48 - "tests/test_option_info_improvements.py" 49 # Requires configured channels 50 - "tests/test_dynamic_channels.py" 51 ]; 52 53 pythonImportsCheck = [ "mcp_nixos" ];
··· 6 7 python3Packages.buildPythonApplication rec { 8 pname = "mcp-nixos"; 9 + version = "1.0.1"; 10 pyproject = true; 11 12 src = fetchFromGitHub { 13 owner = "utensils"; 14 repo = "mcp-nixos"; 15 tag = "v${version}"; 16 + hash = "sha256-NFy38FrU4N+bk4qGyRnrpf2AaBrlQyC9SyRbCLm/d9Y="; 17 }; 18 19 patches = [ ··· 25 26 dependencies = with python3Packages; [ 27 beautifulsoup4 28 + fastmcp 29 mcp 30 requests 31 ]; 32 + 33 + pythonRelaxDeps = [ "fastmcp" ]; 34 35 nativeCheckInputs = with python3Packages; [ 36 anthropic ··· 46 47 disabledTestPaths = [ 48 # Require network access 49 + "tests/test_nixhub.py" 50 + "tests/test_mcp_behavior.py" 51 + "tests/test_options.py" 52 # Requires configured channels 53 + "tests/test_channels.py" 54 ]; 55 56 pythonImportsCheck = [ "mcp_nixos" ];
+5 -8
pkgs/by-name/mc/mcp-nixos/tests-mock-nix-channels.patch
··· 1 diff --git a/tests/conftest.py b/tests/conftest.py 2 - index 0a11295..1172182 100644 3 --- a/tests/conftest.py 4 +++ b/tests/conftest.py 5 - @@ -3,6 +3,30 @@ 6 - import pytest # pylint: disable=unused-import 7 8 9 +@pytest.fixture(autouse=True) 10 +def mock_get_channels(monkeypatch): 11 + """Mock get_channels function to return fixed channels for all tests.""" ··· 23 + monkeypatch.setattr('mcp_nixos.server.get_channels', mock_channels) 24 + 25 + # Also patch any imported references in test modules 26 - + monkeypatch.setattr('tests.test_channel_handling.get_channels', mock_channels) 27 - + monkeypatch.setattr('tests.test_dynamic_channels.get_channels', mock_channels, raising=False) 28 - + monkeypatch.setattr('tests.test_mcp_behavior_comprehensive.get_channels', mock_channels, raising=False) 29 - + monkeypatch.setattr('tests.test_real_world_scenarios.get_channels', mock_channels, raising=False) 30 - + monkeypatch.setattr('tests.test_server_comprehensive.get_channels', mock_channels, raising=False) 31 + 32 + 33 def pytest_addoption(parser):
··· 1 diff --git a/tests/conftest.py b/tests/conftest.py 2 + index baae124..2b4bf01 100644 3 --- a/tests/conftest.py 4 +++ b/tests/conftest.py 5 + @@ -1,6 +1,27 @@ 6 + """Minimal test configuration for refactored MCP-NixOS.""" 7 8 9 + +import pytest 10 +@pytest.fixture(autouse=True) 11 +def mock_get_channels(monkeypatch): 12 + """Mock get_channels function to return fixed channels for all tests.""" ··· 24 + monkeypatch.setattr('mcp_nixos.server.get_channels', mock_channels) 25 + 26 + # Also patch any imported references in test modules 27 + + monkeypatch.setattr('tests.test_server.get_channels', mock_channels) 28 + 29 + 30 def pytest_addoption(parser):