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

nixos/freshrss: fix empty extensions

This commit is contained in:
Felix Buehler 2024-11-28 23:04:18 +01:00
parent ef6dc6c882
commit 0e2c82c341
2 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,7 @@ let
};
env-vars = {
DATA_PATH = cfg.dataDir;
} // lib.optionalAttrs (cfg.extensions != []) {
THIRDPARTY_EXTENSIONS_PATH = "${extension-env}/share/freshrss/";
};
in

View file

@ -21,10 +21,13 @@ stdenvNoCC.mkDerivation rec {
patchShebangs cli/*.php app/actualize_script.php
'';
# the thirdparty_extension_path can only be set by config, but should be read by an env-var.
# THIRDPARTY_EXTENSIONS_PATH can only be set by config, but should be read from an env-var.
overrideConfig = writeText "constants.local.php" ''
<?php
define('THIRDPARTY_EXTENSIONS_PATH', getenv('THIRDPARTY_EXTENSIONS_PATH') . '/extensions');
$thirdpartyExtensionsPath = getenv('THIRDPARTY_EXTENSIONS_PATH');
if (is_string($thirdpartyExtensionsPath) && $thirdpartyExtensionsPath !== "") {
define('THIRDPARTY_EXTENSIONS_PATH', $thirdpartyExtensionsPath . '/extensions');
}
'';
buildInputs = [ php ];