Reapply "remove nix_shell_legacy"

This reverts commit 1232fb5af2.
This commit is contained in:
Jörg Thalheim
2025-04-21 13:03:25 +02:00
parent 5eef4ba663
commit 80e739bd1b
24 changed files with 91 additions and 119 deletions

View File

@@ -29,12 +29,12 @@ def pytest_sessionstart(session: pytest.Session) -> None:
@pytest.fixture
def git_repo(tmp_path: Path) -> Path:
# initialize a git repository
cmd = nix_shell(["nixpkgs#git"], ["git", "init"])
cmd = nix_shell(["git"], ["git", "init"])
subprocess.run(cmd, cwd=tmp_path, check=True)
# set user.name and user.email
cmd = nix_shell(["nixpkgs#git"], ["git", "config", "user.name", "test"])
cmd = nix_shell(["git"], ["git", "config", "user.name", "test"])
subprocess.run(cmd, cwd=tmp_path, check=True)
cmd = nix_shell(["nixpkgs#git"], ["git", "config", "user.email", "test@test.test"])
cmd = nix_shell(["git"], ["git", "config", "user.email", "test@test.test"])
subprocess.run(cmd, cwd=tmp_path, check=True)
# return the path to the git repository
return tmp_path