2021-05-20 23:08:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rss-bridge";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2022-06-14";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RSS-Bridge";
|
|
|
|
repo = "rss-bridge";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-yH+m65CIZokZSbnv1zfpKC/Qr/mPPC6dG49Zn62X0l4=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postPatch = ''
|
2020-08-20 17:08:02 +00:00
|
|
|
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');"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out/
|
|
|
|
cp -R ./* $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The RSS feed for websites missing it";
|
|
|
|
homepage = "https://github.com/RSS-Bridge/rss-bridge";
|
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ dawidsowa ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|