rss-bridge: 2022-06-14 -> 2023-09-24
The source code substitutions have to be adopted to continue working. The PATH_CACHE const has to use `define` instead, as const forbids using functions.
This commit is contained in:
@@ -2,20 +2,22 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rss-bridge";
|
||||
version = "2022-06-14";
|
||||
version = "2023-09-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RSS-Bridge";
|
||||
repo = "rss-bridge";
|
||||
rev = version;
|
||||
sha256 = "sha256-yH+m65CIZokZSbnv1zfpKC/Qr/mPPC6dG49Zn62X0l4=";
|
||||
sha256 = "sha256-N1pbveOgJrB1M+WelKD07Jmv9Vz5NqT+IJf//L8UEnU=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lib/rssbridge.php \
|
||||
--replace "define('PATH_CACHE', PATH_ROOT . 'cache/');" "define('PATH_CACHE', getenv('RSSBRIDGE_DATA') . '/cache/');" \
|
||||
--replace "define('FILE_CONFIG', PATH_ROOT . 'config.ini.php');" "define('FILE_CONFIG', getenv('RSSBRIDGE_DATA') . '/config.ini.php');" \
|
||||
--replace "define('WHITELIST', PATH_ROOT . 'whitelist.txt');" "define('WHITELIST', getenv('RSSBRIDGE_DATA') . '/whitelist.txt');"
|
||||
substituteInPlace lib/RssBridge.php \
|
||||
--replace "__DIR__ . '/../config.ini.php'" "getenv('RSSBRIDGE_DATA') . '/config.ini.php'"
|
||||
substituteInPlace lib/bootstrap.php \
|
||||
--replace "const PATH_CACHE = __DIR__ . '/../cache/';" "define('PATH_CACHE', getenv('RSSBRIDGE_DATA') . '/cache/');"
|
||||
substituteInPlace lib/Configuration.php \
|
||||
--replace "__DIR__ . '/../whitelist.txt'" "getenv('RSSBRIDGE_DATA') . '/whitelist.txt'"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
Reference in New Issue
Block a user