select-shell: Fix breakage with previous shell.nix change
This commit is contained in:
parent
9dbc71e446
commit
e26d1052b6
@ -10,7 +10,8 @@
|
||||
treefmt.programs.mypy.enable = true;
|
||||
treefmt.programs.mypy.directories = {
|
||||
"pkgs/clan-cli".extraPythonPackages = self'.packages.clan-cli.testDependencies;
|
||||
"pkgs/clan-vm-manager".extraPythonPackages = self'.packages.clan-vm-manager.testDependencies;
|
||||
"pkgs/clan-vm-manager".extraPythonPackages =
|
||||
self'.packages.clan-vm-manager.externalTestDeps ++ self'.packages.clan-cli.testDependencies;
|
||||
};
|
||||
|
||||
treefmt.settings.formatter.nix = {
|
||||
|
@ -1,5 +1,4 @@
|
||||
# BUG: If this is enabled the devshell depends on clan_cli building successfully
|
||||
# source_up
|
||||
source_up
|
||||
|
||||
watch_file flake-module.nix shell.nix default.nix
|
||||
|
||||
|
@ -22,9 +22,13 @@ mkShell {
|
||||
] ++ devshellTestDeps;
|
||||
|
||||
shellHook = ''
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
export GIT_ROOT="$(git rev-parse --show-toplevel)"
|
||||
export PKG_ROOT="$GIT_ROOT/pkgs/clan-cli"
|
||||
|
||||
# Add clan command to PATH
|
||||
export PATH="$PKG_ROOT/bin":"$PATH"
|
||||
|
||||
# Needed for impure tests
|
||||
ln -sfT ${clan-cli.nixpkgs} clan_cli/nixpkgs
|
||||
ln -sfT ${clan-cli.nixpkgs} "$PKG_ROOT/clan_cli/nixpkgs"
|
||||
'';
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
# See comment in clan-cli/.envrc
|
||||
# source_up
|
||||
source_up
|
||||
|
||||
watch_file flake-module.nix shell.nix default.nix
|
||||
|
||||
|
@ -45,7 +45,10 @@ let
|
||||
runtimeDependencies = [ ];
|
||||
|
||||
# Dependencies required for running tests
|
||||
externalTestDeps = [
|
||||
externalTestDeps =
|
||||
externalPythonDeps
|
||||
++ runtimeDependencies
|
||||
++ [
|
||||
pytest # Testing framework
|
||||
pytest-cov # Generate coverage reports
|
||||
pytest-subprocess # fake the real subprocess behavior to make your tests more independent.
|
||||
|
@ -30,6 +30,10 @@ disallow_untyped_calls = true
|
||||
disallow_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "clan_cli.*"
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py311"
|
||||
line-length = 88
|
||||
|
@ -14,9 +14,7 @@
|
||||
|
||||
let
|
||||
devshellTestDeps =
|
||||
clan-vm-manager.externalPythonDeps
|
||||
++ clan-vm-manager.externalTestDeps
|
||||
++ clan-vm-manager.runtimeDependencies
|
||||
clan-vm-manager.externalTestDeps
|
||||
++ (with python3.pkgs; [
|
||||
rope
|
||||
mypy
|
||||
@ -43,9 +41,13 @@ mkShell {
|
||||
]);
|
||||
|
||||
shellHook = ''
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
export GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
export PKG_ROOT=$GIT_ROOT/pkgs/clan-vm-manager
|
||||
|
||||
# Add clan-vm-manager command to PATH
|
||||
export PATH="$PKG_ROOT/bin":"$PATH"
|
||||
|
||||
# Add clan-cli to the python path so that we can import it without building it in nix first
|
||||
export PYTHONPATH=$(pwd)/../clan-cli:$PYTHONPATH
|
||||
export PYTHONPATH="$GIT_ROOT/pkgs/clan-cli":"$PYTHONPATH"
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user