From 076fdda0133cb6bdfc1c7691e20763e74b301f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B9=82=E0=B8=97=E0=B8=AA=E0=B8=BA=E0=B8=95=E0=B8=B1?= =?UTF-8?q?=E0=B8=A5?= Date: Sun, 2 Mar 2025 01:50:53 +0700 Subject: [PATCH] {movim,nixos/movim}: fix database options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrong casing, doesn’t work with those not creating a local database, & has a bug with implementation on how it should be overriding the database support to the movim package. --- nixos/modules/services/web-apps/movim.nix | 8 ++++++-- pkgs/by-name/mo/movim/package.nix | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/web-apps/movim.nix b/nixos/modules/services/web-apps/movim.nix index 6907eb8796a8..0c0b6c603cbc 100644 --- a/nixos/modules/services/web-apps/movim.nix +++ b/nixos/modules/services/web-apps/movim.nix @@ -53,10 +53,14 @@ let p = cfg.package.override ( { inherit phpCfg; - withPgsql = cfg.database.type == "pgsql"; - withMysql = cfg.database.type == "mysql"; inherit (cfg) minifyStaticFiles; } + // lib.optionalAttrs (cfg.database.type == "postgresql") { + withPostgreSQL = true; + } + // lib.optionalAttrs (cfg.database.type == "mysql") { + withMySQL = true; + } // lib.optionalAttrs (lib.isAttrs cfg.minifyStaticFiles) ( with cfg.minifyStaticFiles; { diff --git a/pkgs/by-name/mo/movim/package.nix b/pkgs/by-name/mo/movim/package.nix index 7a00ae7dab49..463cc274b641 100644 --- a/pkgs/by-name/mo/movim/package.nix +++ b/pkgs/by-name/mo/movim/package.nix @@ -5,8 +5,8 @@ dash, php, phpCfg ? null, - withPgsql ? true, # “strongly recommended” according to docs - withMysql ? false, + withPostgreSQL ? true, # “strongly recommended” according to docs + withMySQL ? false, minifyStaticFiles ? false, # default files are often not minified esbuild, lightningcss, @@ -67,14 +67,14 @@ php.buildComposerProject2 (finalAttrs: { pdo simplexml ]) - ++ lib.optionals withPgsql ( + ++ lib.optionals withPostgreSQL ( with all; [ pdo_pgsql pgsql ] ) - ++ lib.optionals withMysql ( + ++ lib.optionals withMySQL ( with all; [ mysqli