rename nix_shell_legacy to nix_shell and run_cmd to nix_shell

Than it's more obvious that we need to migrate.
This commit is contained in:
Jörg Thalheim
2025-04-16 19:57:13 +02:00
committed by Mic92
parent 4b9a0d8c19
commit 2240a3a533
24 changed files with 69 additions and 65 deletions

View File

@@ -19,7 +19,7 @@ from clan_cli.dirs import module_root, user_cache_dir, vm_state_dir
from clan_cli.errors import ClanCmdError, ClanError
from clan_cli.facts.generate import generate_facts
from clan_cli.machines.machines import Machine
from clan_cli.nix import nix_shell
from clan_cli.nix import nix_shell_legacy
from clan_cli.qemu.qga import QgaSession
from clan_cli.qemu.qmp import QEMUMonitorProtocol
@@ -96,7 +96,7 @@ def prepare_disk(
file_name: str = "disk.img",
) -> Path:
disk_img = directory / file_name
cmd = nix_shell(
cmd = nix_shell_legacy(
["nixpkgs#qemu"],
[
"qemu-img",
@@ -127,7 +127,7 @@ def start_vm(
) -> Iterator[subprocess.Popen]:
env = os.environ.copy()
env.update(extra_env)
cmd = nix_shell(packages, args)
cmd = nix_shell_legacy(packages, args)
machine.debug(f"Starting VM with command: {cmd}")
with subprocess.Popen(

View File

@@ -6,7 +6,7 @@ from collections.abc import Iterator
from pathlib import Path
from clan_cli.errors import ClanError
from clan_cli.nix import nix_shell
from clan_cli.nix import nix_shell_legacy
@contextlib.contextmanager
@@ -14,7 +14,7 @@ def start_virtiofsd(socket_path: Path) -> Iterator[None]:
sandbox = "namespace"
if shutil.which("newuidmap") is None:
sandbox = "none"
virtiofsd = nix_shell(
virtiofsd = nix_shell_legacy(
["nixpkgs#virtiofsd"],
[
"virtiofsd",

View File

@@ -6,7 +6,7 @@ import time
from collections.abc import Iterator
from clan_cli.errors import ClanError
from clan_cli.nix import nix_shell
from clan_cli.nix import nix_shell_legacy
VMADDR_CID_HYPERVISOR = 2
@@ -29,7 +29,7 @@ def start_waypipe(cid: int | None, title_prefix: str) -> Iterator[None]:
if cid is None:
yield
return
waypipe = nix_shell(
waypipe = nix_shell_legacy(
["nixpkgs#waypipe"],
[
"waypipe",