mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
mediawiki: fix postgres external database host address
Fixes https://github.com/NixOS/nixpkgs/issues/448766
This commit is contained in:
@@ -109,12 +109,12 @@ let
|
||||
'';
|
||||
|
||||
dbAddr =
|
||||
if cfg.database.socket == null then
|
||||
if cfg.database.type == "postgres" then
|
||||
(if cfg.database.socket == null then cfg.database.host else cfg.database.socket)
|
||||
else if cfg.database.socket == null then
|
||||
"${cfg.database.host}:${toString cfg.database.port}"
|
||||
else if cfg.database.type == "mysql" then
|
||||
"${cfg.database.host}:${cfg.database.socket}"
|
||||
else if cfg.database.type == "postgres" then
|
||||
"${cfg.database.socket}"
|
||||
else
|
||||
throw "Unsupported database type: ${cfg.database.type} for socket: ${cfg.database.socket}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user