forked from clan/clan-core
Merge pull request 'clan-vm-manager: devshell doesn't require clan-cli derivation' (#1028) from Qubasa-main into main
This commit is contained in:
commit
f7866d264d
@ -1,7 +1,7 @@
|
||||
# BUG: If this is enabled the devshell depends on clan_cli building successfully
|
||||
# source_up
|
||||
|
||||
watch_file flake-module.nix default.nix
|
||||
watch_file flake-module.nix shell.nix default.nix
|
||||
|
||||
# Because we depend on nixpkgs sources, uploading to builders takes a long time
|
||||
use flake .#clan-cli --builders ''
|
||||
|
@ -24,6 +24,7 @@ mkShell {
|
||||
shellHook = ''
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
|
||||
# Needed for impure tests
|
||||
ln -sfT ${clan-cli.nixpkgs} clan_cli/nixpkgs
|
||||
'';
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# See comment in clan-cli/.envrc
|
||||
# source_up
|
||||
|
||||
watch_file flake-module.nix default.nix
|
||||
watch_file flake-module.nix shell.nix default.nix
|
||||
|
||||
# Because we depend on nixpkgs sources, uploading to builders takes a long time
|
||||
use flake .#clan-vm-manager --builders ''
|
||||
|
@ -45,16 +45,16 @@ let
|
||||
runtimeDependencies = [ ];
|
||||
|
||||
# Dependencies required for running tests
|
||||
testDependencies =
|
||||
runtimeDependencies
|
||||
++ allPythonDeps
|
||||
++ [
|
||||
pytest # Testing framework
|
||||
pytest-cov # Generate coverage reports
|
||||
pytest-subprocess # fake the real subprocess behavior to make your tests more independent.
|
||||
pytest-xdist # Run tests in parallel on multiple cores
|
||||
pytest-timeout # Add timeouts to your tests
|
||||
];
|
||||
externalTestDeps = [
|
||||
pytest # Testing framework
|
||||
pytest-cov # Generate coverage reports
|
||||
pytest-subprocess # fake the real subprocess behavior to make your tests more independent.
|
||||
pytest-xdist # Run tests in parallel on multiple cores
|
||||
pytest-timeout # Add timeouts to your tests
|
||||
];
|
||||
|
||||
# Dependencies required for running tests
|
||||
testDependencies = runtimeDependencies ++ allPythonDeps ++ externalTestDeps;
|
||||
|
||||
# Setup Python environment with all dependencies for running tests
|
||||
pythonWithTestDeps = python3.withPackages (_ps: testDependencies);
|
||||
@ -114,8 +114,9 @@ python3.pkgs.buildPythonApplication rec {
|
||||
# Additional pass-through attributes
|
||||
passthru.desktop-file = desktop-file;
|
||||
passthru.externalPythonDeps = externalPythonDeps;
|
||||
passthru.testDependencies = testDependencies;
|
||||
passthru.externalTestDeps = externalTestDeps;
|
||||
passthru.runtimeDependencies = runtimeDependencies;
|
||||
passthru.testDependencies = testDependencies;
|
||||
|
||||
# Don't leak python packages into a devshell.
|
||||
# It can be very confusing if you `nix run` than load the cli from the devshell instead.
|
||||
|
@ -14,7 +14,9 @@
|
||||
|
||||
let
|
||||
devshellTestDeps =
|
||||
clan-vm-manager.testDependencies
|
||||
clan-vm-manager.externalPythonDeps
|
||||
++ clan-vm-manager.externalTestDeps
|
||||
++ clan-vm-manager.runtimeDependencies
|
||||
++ (with python3.pkgs; [
|
||||
rope
|
||||
mypy
|
||||
@ -42,5 +44,8 @@ mkShell {
|
||||
|
||||
shellHook = ''
|
||||
export PATH=$(pwd)/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
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user