2021-04-03 00:27:46 +00:00
|
|
|
{ pythonPackages, fetchurl, lib, nixosTests }:
|
2017-04-05 01:00:21 +00:00
|
|
|
|
|
|
|
with pythonPackages;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "rss2email";
|
2022-08-27 17:17:37 +00:00
|
|
|
version = "3.14";
|
2017-04-05 01:00:21 +00:00
|
|
|
|
2020-08-02 13:15:09 +00:00
|
|
|
propagatedBuildInputs = [ feedparser html2text ];
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ beautifulsoup4 ];
|
2017-04-05 01:00:21 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://pypi/r/rss2email/${pname}-${version}.tar.gz";
|
2022-08-27 17:17:37 +00:00
|
|
|
sha256 = "sha256-RwORS2PHquxBZLNKqCJtR5XX4SHqPCb/Fn+Y68dfI/g=";
|
2017-04-05 01:00:21 +00:00
|
|
|
};
|
|
|
|
|
2018-02-15 12:19:48 +00:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
|
2018-02-15 12:36:24 +00:00
|
|
|
postPatch = ''
|
|
|
|
# sendmail executable is called from PATH instead of sbin by default
|
|
|
|
sed -e 's|/usr/sbin/sendmail|sendmail|' \
|
|
|
|
-i rss2email/config.py
|
|
|
|
'';
|
|
|
|
|
2017-04-05 01:00:21 +00:00
|
|
|
postInstall = ''
|
2018-02-15 12:19:48 +00:00
|
|
|
install -Dm 644 r2e.1 $man/share/man/man1/r2e.1
|
2017-04-05 01:00:21 +00:00
|
|
|
# an alias for better finding the manpage
|
2018-02-15 12:19:48 +00:00
|
|
|
ln -s -T r2e.1 $man/share/man/man1/rss2email.1
|
|
|
|
|
|
|
|
# copy documentation
|
|
|
|
mkdir -p $doc/share/doc/rss2email
|
2019-08-31 23:56:28 +00:00
|
|
|
cp AUTHORS COPYING CHANGELOG README.rst $doc/share/doc/rss2email/
|
2017-04-05 01:00:21 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-03 00:27:46 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2019-08-31 23:56:28 +00:00
|
|
|
env PATH=$out/bin:$PATH python ./test/test.py
|
2021-04-03 00:27:46 +00:00
|
|
|
runHook postCheck
|
2019-08-31 23:56:28 +00:00
|
|
|
'';
|
2018-02-15 12:19:48 +00:00
|
|
|
|
2017-04-05 01:00:21 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "A tool that converts RSS/Atom newsfeeds to email";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/rss2email";
|
2017-04-05 01:00:21 +00:00
|
|
|
license = licenses.gpl2;
|
2022-04-04 15:08:22 +00:00
|
|
|
maintainers = with maintainers; [ Profpatsch ekleog ];
|
2017-04-05 01:00:21 +00:00
|
|
|
};
|
2018-10-27 09:33:43 +00:00
|
|
|
passthru.tests = {
|
|
|
|
smoke-test = nixosTests.rss2email;
|
|
|
|
};
|
2017-04-05 01:00:21 +00:00
|
|
|
}
|