mcp-nixos: 1.0.0 -> 1.0.1 (#433431)

Changed files
+14 -14
pkgs
+9 -6
pkgs/by-name/mc/mcp-nixos/package.nix
···
python3Packages.buildPythonApplication rec {
pname = "mcp-nixos";
-
version = "1.0.0";
+
version = "1.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "utensils";
repo = "mcp-nixos";
tag = "v${version}";
-
hash = "sha256-NwP+zM1VGLOzIm+mLZVK9/9ImFwuiWhRJ9QK3hGpQsY=";
+
hash = "sha256-NFy38FrU4N+bk4qGyRnrpf2AaBrlQyC9SyRbCLm/d9Y=";
};
patches = [
···
dependencies = with python3Packages; [
beautifulsoup4
+
fastmcp
mcp
requests
];
+
+
pythonRelaxDeps = [ "fastmcp" ];
nativeCheckInputs = with python3Packages; [
anthropic
···
disabledTestPaths = [
# Require network access
-
"tests/test_nixhub_evals.py"
-
"tests/test_mcp_behavior_evals.py"
-
"tests/test_option_info_improvements.py"
+
"tests/test_nixhub.py"
+
"tests/test_mcp_behavior.py"
+
"tests/test_options.py"
# Requires configured channels
-
"tests/test_dynamic_channels.py"
+
"tests/test_channels.py"
];
pythonImportsCheck = [ "mcp_nixos" ];
+5 -8
pkgs/by-name/mc/mcp-nixos/tests-mock-nix-channels.patch
···
diff --git a/tests/conftest.py b/tests/conftest.py
-
index 0a11295..1172182 100644
+
index baae124..2b4bf01 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
-
@@ -3,6 +3,30 @@
-
import pytest # pylint: disable=unused-import
+
@@ -1,6 +1,27 @@
+
"""Minimal test configuration for refactored MCP-NixOS."""
+
+import pytest
+@pytest.fixture(autouse=True)
+def mock_get_channels(monkeypatch):
+ """Mock get_channels function to return fixed channels for all tests."""
···
+ monkeypatch.setattr('mcp_nixos.server.get_channels', mock_channels)
+
+ # Also patch any imported references in test modules
-
+ monkeypatch.setattr('tests.test_channel_handling.get_channels', mock_channels)
-
+ monkeypatch.setattr('tests.test_dynamic_channels.get_channels', mock_channels, raising=False)
-
+ monkeypatch.setattr('tests.test_mcp_behavior_comprehensive.get_channels', mock_channels, raising=False)
-
+ monkeypatch.setattr('tests.test_real_world_scenarios.get_channels', mock_channels, raising=False)
-
+ monkeypatch.setattr('tests.test_server_comprehensive.get_channels', mock_channels, raising=False)
+
+ monkeypatch.setattr('tests.test_server.get_channels', mock_channels)
+
+
def pytest_addoption(parser):