clan-cli/tests/clan_flake: add flake.nix

This commit is contained in:
Jörg Thalheim
2023-08-10 15:36:19 +02:00
parent 8bf809d0ec
commit c9b77e5927

View File

@@ -10,6 +10,15 @@ def clan_flake(temporary_dir: Path, monkeypatch: pytest.MonkeyPatch) -> Iterator
flake = temporary_dir / "clan-flake"
flake.mkdir()
(flake / ".clan-flake").touch()
(flake / "flake.nix").write_text(
"""
{
description = "A flake for testing clan";
inputs = {};
outputs = { self, nixpkgs }: {};
}
"""
)
monkeypatch.chdir(flake)
with mock_env(HOME=str(temporary_dir)):
yield flake