3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/feedreaders/rss2email/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

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