open-webui: fix pyodide update, update pyodide to 0.29.3 (#507787)

This commit is contained in:
Sandro
2026-05-17 00:04:21 +00:00
committed by GitHub
2 changed files with 5 additions and 10 deletions
+2 -4
View File
@@ -24,11 +24,9 @@ let
# the backend for run-on-client-browser python execution
# must match lock file in open-webui
# TODO: should we automate this?
# TODO: with JQ? "jq -r '.packages["node_modules/pyodide"].version' package-lock.json"
pyodideVersion = "0.28.2";
pyodideVersion = "0.28.3";
pyodide = fetchurl {
hash = "sha256-MQIRdOj9yVVsF+nUNeINnAfyA6xULZFhyjuNnV0E5+c=";
hash = "sha256-fcqubT8VmGoJ8PnmxHE6DA8kv/DJDHToWoFyPxvGCUA=";
url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2";
};
+3 -6
View File
@@ -22,11 +22,8 @@ npm_hash=$(prefetch-npm-deps package-lock.json)
sed -i 's#npmDepsHash = "[^"]*"#npmDepsHash = "'"$npm_hash"'"#' "$path"
# Extract pyodide version
pyodide_version=$(sed -rn 's/^.*pyodide.*\^([0-9.]*)\".*$/\1/p' package.json)
pyodide_version=$(jq -r '.packages["node_modules/pyodide"].version' package-lock.json)
popd
# Update the pyodide version if necessary
current_pyodide_version=$(nix eval --raw -f . open-webui.frontend.pyodideVersion)
if [ "$current_pyodide_version" < "$pyodide_version" ]; then
update-source-version open-webui.frontend "${pyodide_version}" --file="$path" --version-key=pyodideVersion --source-key=pyodide
fi
# Update the pyodide version
update-source-version open-webui.frontend "${pyodide_version}" --file="$path" --version-key=pyodideVersion --source-key=pyodide