Revert "remove nix_shell_legacy"

This reverts commit 8cde32c76f.
This commit is contained in:
Johannes Kirschbauer
2025-04-18 14:47:37 +02:00
parent 83542b20b4
commit 1232fb5af2
24 changed files with 119 additions and 91 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(["git"], ["git", "init"])
cmd = nix_shell(["nixpkgs#git"], ["git", "init"])
subprocess.run(cmd, cwd=tmp_path, check=True)
# set user.name and user.email
cmd = nix_shell(["git"], ["git", "config", "user.name", "test"])
cmd = nix_shell(["nixpkgs#git"], ["git", "config", "user.name", "test"])
subprocess.run(cmd, cwd=tmp_path, check=True)
cmd = nix_shell(["git"], ["git", "config", "user.email", "test@test.test"])
cmd = nix_shell(["nixpkgs#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