0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #148696 from MasseR/master

Fix the syntax error on tt-rss config file
This commit is contained in:
Guillaume Girol 2021-12-11 20:57:15 +00:00 committed by GitHub
commit 57f7f3a87b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,11 +18,11 @@ let
tt-rss-config = let tt-rss-config = let
password = password =
if (cfg.database.password != null) then if (cfg.database.password != null) then
"${(escape ["'" "\\"] cfg.database.password)}" "'${(escape ["'" "\\"] cfg.database.password)}'"
else if (cfg.database.passwordFile != null) then else if (cfg.database.passwordFile != null) then
"file_get_contents('${cfg.database.passwordFile}'" "file_get_contents('${cfg.database.passwordFile}')"
else else
"" null
; ;
in pkgs.writeText "config.php" '' in pkgs.writeText "config.php" ''
<?php <?php
@ -40,7 +40,7 @@ let
putenv('TTRSS_DB_HOST=${optionalString (cfg.database.host != null) cfg.database.host}'); putenv('TTRSS_DB_HOST=${optionalString (cfg.database.host != null) cfg.database.host}');
putenv('TTRSS_DB_USER=${cfg.database.user}'); putenv('TTRSS_DB_USER=${cfg.database.user}');
putenv('TTRSS_DB_NAME=${cfg.database.name}'); putenv('TTRSS_DB_NAME=${cfg.database.name}');
putenv('TTRSS_DB_PASS=${password}'); putenv('TTRSS_DB_PASS=' ${optionalString (password != null) ". ${password}"});
putenv('TTRSS_DB_PORT=${toString dbPort}'); putenv('TTRSS_DB_PORT=${toString dbPort}');
putenv('TTRSS_AUTH_AUTO_CREATE=${boolToString cfg.auth.autoCreate}'); putenv('TTRSS_AUTH_AUTO_CREATE=${boolToString cfg.auth.autoCreate}');