devshell: remove dependency on clan-cli derivation
The devShell depended on clan-cli due to it being included as a dependency in the treefmt config. This is not optimal because this makes the devshell rebuild unnecessary often and also lead to build failures of the dev-shell if the clan-cli code is in a broken state (git rebasing, or during development etc.)
This commit is contained in:
parent
b2b94b269a
commit
580010581c
|
@ -15,11 +15,9 @@
|
|||
ps:
|
||||
clan-cli.propagatedBuildInputs
|
||||
++ clan-cli.devDependencies
|
||||
++ [
|
||||
ps.pip
|
||||
++ [ ps.pip ]
|
||||
++ [ clan-vm-manager.externalPythonDeps ]
|
||||
# clan-vm-manager deps
|
||||
ps.pygobject3
|
||||
]
|
||||
);
|
||||
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux [ pkgs.xdg-utils ];
|
||||
in
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
treefmt.programs.mypy.enable = true;
|
||||
treefmt.programs.mypy.directories = {
|
||||
"pkgs/clan-cli".extraPythonPackages = self'.packages.clan-cli.pytestDependencies;
|
||||
"pkgs/clan-vm-manager".extraPythonPackages = self'.packages.clan-vm-manager.propagatedBuildInputs;
|
||||
"pkgs/clan-vm-manager".extraPythonPackages =
|
||||
self'.packages.clan-vm-manager.externalPythonDeps ++ self'.packages.clan-cli.pytestDependencies;
|
||||
};
|
||||
|
||||
treefmt.settings.formatter.nix = {
|
||||
|
|
|
@ -24,7 +24,7 @@ let
|
|||
mimeTypes = [ "x-scheme-handler/clan" ];
|
||||
};
|
||||
in
|
||||
python3.pkgs.buildPythonApplication {
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
name = "clan-vm-manager";
|
||||
src = source;
|
||||
format = "pyproject";
|
||||
|
@ -51,13 +51,19 @@ python3.pkgs.buildPythonApplication {
|
|||
# We need to propagate the build inputs to nix fmt / treefmt
|
||||
propagatedBuildInputs = [
|
||||
(python3.pkgs.toPythonModule clan-cli)
|
||||
pygobject3
|
||||
pygobject-stubs
|
||||
passthru.externalPythonDeps
|
||||
];
|
||||
|
||||
# also re-expose dependencies so we test them in CI
|
||||
passthru = {
|
||||
inherit desktop-file;
|
||||
# Keep external dependencies in a separate lists to refer to thm elsewhere
|
||||
# This helps avoiding issues like dev-shells accidentally depending on
|
||||
# nix derivations of local packages.
|
||||
externalPythonDeps = [
|
||||
pygobject3
|
||||
pygobject-stubs
|
||||
];
|
||||
tests = {
|
||||
clan-vm-manager-no-breakpoints = runCommand "clan-vm-manager-no-breakpoints" { } ''
|
||||
if grep --include \*.py -Rq "breakpoint()" ${source}; then
|
||||
|
|
|
@ -22,6 +22,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
|
||||
|
|
Loading…
Reference in New Issue
Block a user