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 9c92a81411
commit 79635efaa5
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 pygobject3
pygobject-stubs pygobject-stubs
gtk4 gtk4
libadwaita libadwaita
webkitgtk_6_0
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,13 +8,12 @@
system, system,
... ...
}: }:
if lib.elem system lib.platforms.darwin then
{ }
else
{ {
devShells.clan-vm-manager = pkgs.callPackage ./shell.nix { devShells.clan-vm-manager = pkgs.callPackage ./shell.nix {
inherit (config.packages) clan-vm-manager; inherit (config.packages) clan-vm-manager;
}; };
}
// lib.optionalAttrs (system != lib.platforms.darwin) {
packages.clan-vm-manager = pkgs.python3.pkgs.callPackage ./default.nix { packages.clan-vm-manager = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (config.packages) clan-cli; inherit (config.packages) clan-cli;
}; };