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:
|
ps:
|
||||||
clan-cli.propagatedBuildInputs
|
clan-cli.propagatedBuildInputs
|
||||||
++ clan-cli.devDependencies
|
++ clan-cli.devDependencies
|
||||||
++ [
|
++ [ ps.pip ]
|
||||||
ps.pip
|
++ [ clan-vm-manager.externalPythonDeps ]
|
||||||
# clan-vm-manager deps
|
# clan-vm-manager deps
|
||||||
ps.pygobject3
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux [ pkgs.xdg-utils ];
|
linuxOnlyPackages = lib.optionals pkgs.stdenv.isLinux [ pkgs.xdg-utils ];
|
||||||
in
|
in
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
treefmt.programs.mypy.enable = true;
|
treefmt.programs.mypy.enable = true;
|
||||||
treefmt.programs.mypy.directories = {
|
treefmt.programs.mypy.directories = {
|
||||||
"pkgs/clan-cli".extraPythonPackages = self'.packages.clan-cli.pytestDependencies;
|
"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 = {
|
treefmt.settings.formatter.nix = {
|
||||||
|
|
|
@ -24,7 +24,7 @@ let
|
||||||
mimeTypes = [ "x-scheme-handler/clan" ];
|
mimeTypes = [ "x-scheme-handler/clan" ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
python3.pkgs.buildPythonApplication {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
name = "clan-vm-manager";
|
name = "clan-vm-manager";
|
||||||
src = source;
|
src = source;
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
@ -51,13 +51,19 @@ python3.pkgs.buildPythonApplication {
|
||||||
# We need to propagate the build inputs to nix fmt / treefmt
|
# We need to propagate the build inputs to nix fmt / treefmt
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
(python3.pkgs.toPythonModule clan-cli)
|
(python3.pkgs.toPythonModule clan-cli)
|
||||||
pygobject3
|
passthru.externalPythonDeps
|
||||||
pygobject-stubs
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# also re-expose dependencies so we test them in CI
|
# also re-expose dependencies so we test them in CI
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit desktop-file;
|
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 = {
|
tests = {
|
||||||
clan-vm-manager-no-breakpoints = runCommand "clan-vm-manager-no-breakpoints" { } ''
|
clan-vm-manager-no-breakpoints = runCommand "clan-vm-manager-no-breakpoints" { } ''
|
||||||
if grep --include \*.py -Rq "breakpoint()" ${source}; then
|
if grep --include \*.py -Rq "breakpoint()" ${source}; then
|
||||||
|
|
|
@ -22,6 +22,10 @@ disallow_untyped_calls = true
|
||||||
disallow_untyped_defs = true
|
disallow_untyped_defs = true
|
||||||
no_implicit_optional = true
|
no_implicit_optional = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "clan_cli.*"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
target-version = "py311"
|
target-version = "py311"
|
||||||
line-length = 88
|
line-length = 88
|
||||||
|
|
Loading…
Reference in New Issue
Block a user