Fix runtime errors and improve robustness in host configs and scripts

- Fix KeyError in julia.nix when Project.toml lacks deps table
- Fix incorrect uv args in python.nix (remove --run + --add-flags combination)
- Remove redundant 'uv add ipython' from sync branch in python.nix
- Fix relative paths in project-scripts.nix (./scripts -> ../scripts)
- Fix initProject.sh to check file existence before git add
- Add RVER validation in updateDeps.sh with proper error handling
- Add tool availability checks in updateDeps.sh (uv, julia, devenv)
- Add flake.nix backup before modification in updateDeps.sh
- Ensure updateDeps.sh runs from repository root

Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-11 19:48:19 +00:00
commit 2a5a1acd62
5 changed files with 84 additions and 38 deletions

View file

@ -49,7 +49,9 @@ config: pkgs: {
pluto = let
runPluto = ''
import Pkg; import TOML; Pkg.instantiate();
if !isfile("Project.toml") || !haskey(TOML.parsefile(Base.active_project())["deps"], "Pluto")
proj = isfile("Project.toml") ? TOML.parsefile(Base.active_project()) : Dict();
deps = get(proj, "deps", Dict());
if !haskey(deps, "Pluto")
Pkg.add("Pluto");
end
import Pluto; Pluto.run();

View file

@ -37,17 +37,12 @@ config: pkgs: {
echo "🐍 Launching Marimo..."
echo "--------------------------------------------------------------------------"
fi
uv run marimo edit "$@"
'';
in {
enable = config.enabledLanguages.python;
path = {
value = "${pkgs.uv}/bin/uv";
args = [
"--run"
"${marimoInit}"
"--add-flags"
"run marimo edit \"$@\""
];
value = "${pkgs.writeShellScriptBin "marimo-wrapper" marimoInit}/bin/marimo-wrapper";
};
};
@ -78,23 +73,16 @@ config: pkgs: {
else
echo "--------------------------------------------------------------------------"
echo "🔄 Syncing existing project..."
echo "📦 Ensuring IPython is installed..."
uv add ipython
uv sync
echo "🐍 Launching IPython..."
echo "--------------------------------------------------------------------------"
fi
uv run ipython "$@"
'';
in {
enable = config.enabledLanguages.python;
path = {
value = "${pkgs.uv}/bin/uv";
args = [
"--run"
"${ipythonInit}"
"--add-flags"
"run ipython \"$@\""
];
value = "${pkgs.writeShellScriptBin "ipy-wrapper" ipythonInit}/bin/ipy-wrapper";
};
};