open-webui: fix self-reference of mariadb

This commit is contained in:
codgician
2026-03-12 01:07:12 +08:00
parent db6cbbdb2c
commit e3a33cc4b0
2 changed files with 16 additions and 7 deletions

View File

@@ -1,4 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
pkgs,
...
}:
let
mainPort = "8080";
webuiName = "NixOS Test";
@@ -16,6 +21,10 @@ in
services.open-webui = {
enable = true;
host = "";
# Use package with all optional dependencies to ensure they are buildable
package = pkgs.open-webui.overridePythonAttrs (old: {
dependencies = old.dependencies ++ pkgs.open-webui.optional-dependencies.all;
});
environment = {
# Requires network connection
RAG_EMBEDDING_MODEL = "";

View File

@@ -69,7 +69,7 @@ let
'';
};
in
python3Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication (finalAttrs: {
inherit pname version src;
pyproject = true;
@@ -196,7 +196,7 @@ python3Packages.buildPythonApplication rec {
++ pyjwt.optional-dependencies.crypto
++ starsessions.optional-dependencies.redis;
optional-dependencies = with python3Packages; rec {
optional-dependencies = with python3Packages; {
postgres = [
pgvector
psycopg2-binary
@@ -212,7 +212,6 @@ python3Packages.buildPythonApplication rec {
elasticsearch
firecrawl-py
gcp-storage-emulator
mariadb
moto
oracledb
pinecone-client
@@ -222,8 +221,9 @@ python3Packages.buildPythonApplication rec {
qdrant-client
weaviate-client
]
++ moto.optional-dependencies.s3
++ postgres;
++ finalAttrs.passthru.optional-dependencies.mariadb
++ finalAttrs.passthru.optional-dependencies.postgres
++ moto.optional-dependencies.s3;
};
pythonImportsCheck = [ "open_webui" ];
@@ -265,4 +265,4 @@ python3Packages.buildPythonApplication rec {
codgician
];
};
}
})