mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-12 02:21:59 +00:00
allow direnv to change vscode python path when updating
This commit is contained in:
@@ -26,13 +26,12 @@
|
|||||||
});
|
});
|
||||||
}).env.overrideAttrs (oldAttrs: {
|
}).env.overrideAttrs (oldAttrs: {
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
set -o noclobber
|
|
||||||
PYTHONPATH=`which python`
|
PYTHONPATH=`which python`
|
||||||
FILE=.vscode/settings.json
|
FILE=.vscode/settings.json
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "$FILE already exists, not writing interpreter path to it."
|
jq --arg pythonpath "$PYTHONPATH" '.["python.defaultInterpreterPath"] = $pythonpath' $FILE > "$FILE.tmp" && mv "$FILE.tmp" "$FILE"
|
||||||
else
|
else
|
||||||
echo "{\"python.defaultInterpreterPath\": \"''${PYTHONPATH}\"}" > "$FILE"
|
echo "{\"python.defaultInterpreterPath\": \"$PYTHONPATH\"}" > "$FILE"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
UV_USE_IO_URING = 0; # work around node#48444
|
UV_USE_IO_URING = 0; # work around node#48444
|
||||||
@@ -40,6 +39,7 @@
|
|||||||
nodejs_22
|
nodejs_22
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
||||||
poetry
|
poetry
|
||||||
|
jq
|
||||||
# fixes local pyright not being able to see the pythonpath properly.
|
# fixes local pyright not being able to see the pythonpath properly.
|
||||||
(pkgs.writeShellScriptBin "pyright" ''
|
(pkgs.writeShellScriptBin "pyright" ''
|
||||||
${pkgs.pyright}/bin/pyright --pythonpath `which python3` "$@" '')
|
${pkgs.pyright}/bin/pyright --pythonpath `which python3` "$@" '')
|
||||||
|
|||||||
Reference in New Issue
Block a user