Skip to content

Commit

Permalink
rss-bridge: 2022-06-14 -> 2023-09-24
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mynacol committed Sep 27, 2023
1 parent f75f5fd commit 7899087
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkgs/servers/web-apps/rss-bridge/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 7899087

Please sign in to comment.