forked from clan/clan-core
clan-vm-manager: prepend local clan-cli to python path
This commit is contained in:
parent
b8f5c13553
commit
79d0f441d9
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(
|
||||
0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
|
||||
)
|
||||
module_path = Path(__file__).parent.parent.absolute()
|
||||
|
||||
sys.path.insert(0, str(module_path))
|
||||
sys.path.insert(0, str(module_path.parent / "clan_cli"))
|
||||
|
||||
from clan_vm_manager import main # NOQA
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ clan-vm-manager, clan-cli, mkShell, ruff, python3 }:
|
||||
let
|
||||
pythonWithDeps = python3.withPackages (ps: clan-vm-manager.propagatedBuildInputs);
|
||||
in
|
||||
{ clan-vm-manager, clan-cli, mkShell, ruff }:
|
||||
mkShell {
|
||||
buildInputs = [ pythonWithDeps ] ++ clan-vm-manager.buildInputs;
|
||||
inherit (clan-vm-manager) propagatedBuildInputs buildInputs;
|
||||
nativeBuildInputs = [
|
||||
ruff
|
||||
] ++ clan-vm-manager.nativeBuildInputs;
|
||||
|
||||
shellHook = ''
|
||||
ln -sfT ${clan-cli.nixpkgs} ../clan-cli/clan_cli/nixpkgs
|
||||
|
||||
# prepend clan-cli for development
|
||||
export PYTHONPATH=../clan-cli:$PYTHONPATH
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user