2018-10-27 02:33:43 -07:00
|
|
|
{ pythonPackages, fetchurl, lib, nixosTests }:
|
2017-04-04 18:00:21 -07:00
|
|
|
|
|
|
|
with pythonPackages;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "rss2email";
|
2020-08-31 08:34:31 -07:00
|
|
|
version = "3.12.2";
|
2017-04-04 18:00:21 -07:00
|
|
|
|
2020-08-02 06:15:09 -07:00
|
|
|
propagatedBuildInputs = [ feedparser html2text ];
|
|
|
|
checkInputs = [ beautifulsoup4 ];
|
2017-04-04 18:00:21 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "mirror://pypi/r/rss2email/${pname}-${version}.tar.gz";
|
2020-08-31 08:34:31 -07:00
|
|
|
sha256 = "12w6x80wsw6xm17fxyymnl45aavsagg932zw621wcjz154vjghjr";
|
2017-04-04 18:00:21 -07:00
|
|
|
};
|
|
|
|
|
2018-02-15 04:19:48 -08:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
|
2018-02-15 04:36:24 -08: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-04 18:00:21 -07:00
|
|
|
postInstall = ''
|
2018-02-15 04:19:48 -08:00
|
|
|
install -Dm 644 r2e.1 $man/share/man/man1/r2e.1
|
2017-04-04 18:00:21 -07:00
|
|
|
# an alias for better finding the manpage
|
2018-02-15 04:19:48 -08:00
|
|
|
ln -s -T r2e.1 $man/share/man/man1/rss2email.1
|
|
|
|
|
|
|
|
# copy documentation
|
|
|
|
mkdir -p $doc/share/doc/rss2email
|
2019-08-31 16:56:28 -07:00
|
|
|
cp AUTHORS COPYING CHANGELOG README.rst $doc/share/doc/rss2email/
|
2017-04-04 18:00:21 -07:00
|
|
|
'';
|
|
|
|
|
2019-08-31 16:56:28 -07:00
|
|
|
postCheck = ''
|
|
|
|
env PATH=$out/bin:$PATH python ./test/test.py
|
|
|
|
'';
|
2018-02-15 04:19:48 -08:00
|
|
|
|
2017-04-04 18:00:21 -07:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool that converts RSS/Atom newsfeeds to email.";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://pypi.python.org/pypi/rss2email";
|
2017-04-04 18:00:21 -07:00
|
|
|
license = licenses.gpl2;
|
2020-08-02 06:15:09 -07:00
|
|
|
maintainers = with maintainers; [ jb55 Profpatsch ekleog ];
|
2017-04-04 18:00:21 -07:00
|
|
|
};
|
2018-10-27 02:33:43 -07:00
|
|
|
passthru.tests = {
|
|
|
|
smoke-test = nixosTests.rss2email;
|
|
|
|
};
|
2017-04-04 18:00:21 -07:00
|
|
|
}
|