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:
parent
ef6dc6c882
commit
0e2c82c341
2 changed files with 6 additions and 2 deletions
|
@ -10,6 +10,7 @@ let
|
|||
};
|
||||
env-vars = {
|
||||
DATA_PATH = cfg.dataDir;
|
||||
} // lib.optionalAttrs (cfg.extensions != []) {
|
||||
THIRDPARTY_EXTENSIONS_PATH = "${extension-env}/share/freshrss/";
|
||||
};
|
||||
in
|
||||
|
|
|
@ -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 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue