Fix circular dependency - define setupVenvScript before venvDerivation

This commit is contained in:
Celes Renata
2025-12-12 12:05:02 -08:00
parent f54fe8b578
commit 86abec2bf9
+11 -11
View File
@@ -8,17 +8,6 @@ let
cfg = config.programs.dots-hyprland.python; cfg = config.programs.dots-hyprland.python;
mainCfg = config.programs.dots-hyprland; mainCfg = config.programs.dots-hyprland;
# Build Python venv as a derivation (happens during build, not activation)
venvDerivation = pkgs.runCommand "dots-hyprland-venv" {
buildInputs = [ pkgs.python312 ];
nativeBuildInputs = with pkgs; [ cmake pkg-config gcc gnumake wayland wayland-protocols ];
} ''
export HOME=$TMPDIR
mkdir -p $out
${setupVenvScript}
mv $HOME/.local/state/quickshell/.venv $out/venv
'';
# Virtual environment setup script that replicates installer behavior # Virtual environment setup script that replicates installer behavior
setupVenvScript = pkgs.writeShellScript "setup-dots-hyprland-venv" '' setupVenvScript = pkgs.writeShellScript "setup-dots-hyprland-venv" ''
#!/usr/bin/env bash #!/usr/bin/env bash
@@ -172,6 +161,17 @@ else:
echo "🎉 Python environment test complete!" echo "🎉 Python environment test complete!"
''; '';
# Build Python venv as a derivation (happens during build, not activation)
venvDerivation = pkgs.runCommand "dots-hyprland-venv" {
buildInputs = [ pkgs.python312 ];
nativeBuildInputs = with pkgs; [ cmake pkg-config gcc gnumake wayland wayland-protocols ];
} ''
export HOME=$TMPDIR
mkdir -p $out
${setupVenvScript}
mv $HOME/.local/state/quickshell/.venv $out/venv
'';
in in
{ {
options.programs.dots-hyprland.python = { options.programs.dots-hyprland.python = {