clan-vm-manager: support basic devshell on macOS

This commit is contained in:
Jörg Thalheim
2025-03-19 15:23:50 +01:00
parent 3d5ef5e909
commit a565a85a5e
2 changed files with 25 additions and 20 deletions

View File

@@ -19,6 +19,8 @@
setuptools, setuptools,
webkitgtk_6_0, webkitgtk_6_0,
wrapGAppsHook, wrapGAppsHook,
lib,
stdenv,
}: }:
let let
source = ./.; source = ./.;
@@ -32,14 +34,18 @@ let
}; };
# Dependencies that are directly used in the project but nor from internal python packages # Dependencies that are directly used in the project but nor from internal python packages
externalPythonDeps = [ externalPythonDeps =
pygobject3 [
pygobject-stubs pygobject3
gtk4 pygobject-stubs
libadwaita gtk4
webkitgtk_6_0 libadwaita
adwaita-icon-theme adwaita-icon-theme
] ++ clan-cli.propagatedBuildInputs; ]
++ clan-cli.propagatedBuildInputs
++ lib.optionals (!stdenv.isDarwin) [
webkitgtk_6_0
];
# Deps including python packages from the local project # Deps including python packages from the local project
allPythonDeps = [ (python3.pkgs.toPythonModule clan-cli) ] ++ externalPythonDeps; allPythonDeps = [ (python3.pkgs.toPythonModule clan-cli) ] ++ externalPythonDeps;

View File

@@ -8,17 +8,16 @@
system, system,
... ...
}: }:
if lib.elem system lib.platforms.darwin then {
{ } devShells.clan-vm-manager = pkgs.callPackage ./shell.nix {
else inherit (config.packages) clan-vm-manager;
{
devShells.clan-vm-manager = pkgs.callPackage ./shell.nix {
inherit (config.packages) clan-vm-manager;
};
packages.clan-vm-manager = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (config.packages) clan-cli;
};
checks = config.packages.clan-vm-manager.tests;
}; };
}
// lib.optionalAttrs (system != lib.platforms.darwin) {
packages.clan-vm-manager = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (config.packages) clan-cli;
};
checks = config.packages.clan-vm-manager.tests;
};
} }