diff --git a/nixos/tests/open-webui.nix b/nixos/tests/open-webui.nix index 91cd52843c11..30af530c9f24 100644 --- a/nixos/tests/open-webui.nix +++ b/nixos/tests/open-webui.nix @@ -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 = ""; diff --git a/pkgs/by-name/op/open-webui/package.nix b/pkgs/by-name/op/open-webui/package.nix index 35d7ef7abb35..032b4bbdc126 100644 --- a/pkgs/by-name/op/open-webui/package.nix +++ b/pkgs/by-name/op/open-webui/package.nix @@ -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 ]; }; -} +})