Unverified Commit e7a02c9b authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

open-webui: 0.6.18 -> 0.6.22 (#433087)

parents 0300b04b 9a10f0dc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -9,13 +9,13 @@
}:
let
  pname = "open-webui";
  version = "0.6.18";
  version = "0.6.22";

  src = fetchFromGitHub {
    owner = "open-webui";
    repo = "open-webui";
    tag = "v${version}";
    hash = "sha256-1V9mOhO8jpr0HU0djLjKw6xDQMBmqie6Gte4xfg9PfQ=";
    hash = "sha256-SX2uLmDZu1TW45A6F5mSXVtSqv5rbNKuVw8sWj8tEb4=";
  };

  frontend = buildNpmPackage rec {
@@ -32,7 +32,7 @@ let
      url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2";
    };

    npmDepsHash = "sha256-bMqK9NvuTwqnhflGDfZTEkaFG8y34Qf94SgR0HMClrQ=";
    npmDepsHash = "sha256-mMnDYMy1/7gW6XVaWVct9BuxDP78XX5u46lGBWjUvOQ=";

    # See https://github.com/open-webui/open-webui/issues/15880
    npmFlags = [
@@ -161,6 +161,7 @@ python3Packages.buildPythonApplication rec {
      opentelemetry-instrumentation-logging
      opentelemetry-instrumentation-httpx
      opentelemetry-instrumentation-aiohttp-client
      oracledb
      pandas
      passlib
      peewee
@@ -172,6 +173,7 @@ python3Packages.buildPythonApplication rec {
      posthog
      psutil
      psycopg2-binary
      pyarrow
      pycrdt
      pydub
      pyjwt
+12 −2
Original line number Diff line number Diff line
@@ -11,12 +11,22 @@ update-source-version open-webui "${version:1}" --file="$path"

# Fetch npm deps and pyodide
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT

curl -O --output-dir $tmpdir "https://raw.githubusercontent.com/open-webui/open-webui/refs/tags/${version}/package-lock.json"
curl -O --output-dir $tmpdir "https://raw.githubusercontent.com/open-webui/open-webui/refs/tags/${version}/package.json"
pushd $tmpdir

# Prefetch the npm dependencies hash
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)
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
rm -rf $tmpdir
fi