From 7899087a53bf6a54e7d51936c8cbba4cfa4675e3 Mon Sep 17 00:00:00 2001 From: Mynacol Date: Wed, 27 Sep 2023 13:37:37 +0200 Subject: [PATCH] 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. --- pkgs/servers/web-apps/rss-bridge/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/web-apps/rss-bridge/default.nix b/pkgs/servers/web-apps/rss-bridge/default.nix index 70cf53e725be6d7..cf32bfdabf42719 100644 --- a/pkgs/servers/web-apps/rss-bridge/default.nix +++ b/pkgs/servers/web-apps/rss-bridge/default.nix @@ -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 = ''