rss2email: modernize, move to pkgs/by-name (#424463)

authored by

Aleksana and committed by
GitHub
7c257e66 7a2509e7

+27 -22
+27 -18
pkgs/applications/networking/feedreaders/rss2email/default.nix pkgs/by-name/rs/rss2email/package.nix
··· 1 { 2 lib, 3 - pythonPackages, 4 fetchPypi, 5 fetchpatch2, 6 nixosTests, 7 }: 8 9 - with pythonPackages; 10 - 11 - buildPythonApplication rec { 12 pname = "rss2email"; 13 version = "3.14"; 14 - format = "setuptools"; 15 - 16 - propagatedBuildInputs = [ 17 - feedparser 18 - html2text 19 - ]; 20 - nativeCheckInputs = [ beautifulsoup4 ]; 21 22 src = fetchPypi { 23 inherit pname version; ··· 30 url = "https://github.com/rss2email/rss2email/commit/b5c0e78006c2db6929b5ff50e8529de58a00412a.patch"; 31 hash = "sha256-edmsi3I0acx5iF9xoAS9deSexqW2UtWZR/L7CgeZs/M="; 32 }) 33 ]; 34 35 outputs = [ ··· 40 41 postPatch = '' 42 # sendmail executable is called from PATH instead of sbin by default 43 - sed -e 's|/usr/sbin/sendmail|sendmail|' \ 44 - -i rss2email/config.py 45 ''; 46 47 postInstall = '' 48 install -Dm 644 r2e.1 $man/share/man/man1/r2e.1 49 # an alias for better finding the manpage ··· 54 cp AUTHORS COPYING CHANGELOG README.rst $doc/share/doc/rss2email/ 55 ''; 56 57 - checkPhase = '' 58 - runHook preCheck 59 - env PATH=$out/bin:$PATH python ./test/test.py 60 - runHook postCheck 61 - ''; 62 63 meta = with lib; { 64 description = "Tool that converts RSS/Atom newsfeeds to email";
··· 1 { 2 lib, 3 + python3Packages, 4 fetchPypi, 5 fetchpatch2, 6 nixosTests, 7 }: 8 9 + python3Packages.buildPythonApplication rec { 10 pname = "rss2email"; 11 version = "3.14"; 12 + pyproject = true; 13 14 src = fetchPypi { 15 inherit pname version; ··· 22 url = "https://github.com/rss2email/rss2email/commit/b5c0e78006c2db6929b5ff50e8529de58a00412a.patch"; 23 hash = "sha256-edmsi3I0acx5iF9xoAS9deSexqW2UtWZR/L7CgeZs/M="; 24 }) 25 + (fetchpatch2 { 26 + name = "use-poetry-core.patch"; 27 + url = "https://github.com/rss2email/rss2email/commit/183a17aefe4eb66f898cf088519b1e845559f2bd.patch"; 28 + hash = "sha256-SoWahlOJ7KkaHMwOrKIBgwEz8zJQrSXVD1w2wiV1phE="; 29 + }) 30 ]; 31 32 outputs = [ ··· 37 38 postPatch = '' 39 # sendmail executable is called from PATH instead of sbin by default 40 + substituteInPlace rss2email/config.py \ 41 + --replace-fail '/usr/sbin/sendmail' 'sendmail' 42 ''; 43 44 + build-system = with python3Packages; [ 45 + poetry-core 46 + ]; 47 + 48 + dependencies = with python3Packages; [ 49 + feedparser 50 + html2text 51 + ]; 52 + 53 postInstall = '' 54 install -Dm 644 r2e.1 $man/share/man/man1/r2e.1 55 # an alias for better finding the manpage ··· 60 cp AUTHORS COPYING CHANGELOG README.rst $doc/share/doc/rss2email/ 61 ''; 62 63 + nativeCheckInputs = [ 64 + python3Packages.unittestCheckHook 65 + ]; 66 + 67 + unittestFlagsArray = [ 68 + "-s" 69 + "test" 70 + ]; 71 72 meta = with lib; { 73 description = "Tool that converts RSS/Atom newsfeeds to email";
-4
pkgs/top-level/all-packages.nix
··· 4287 4288 rsibreak = libsForQt5.callPackage ../applications/misc/rsibreak { }; 4289 4290 - rss2email = callPackage ../applications/networking/feedreaders/rss2email { 4291 - pythonPackages = python3Packages; 4292 - }; 4293 - 4294 rucio = callPackage ../by-name/ru/rucio/package.nix { 4295 # Pinned to python 3.12 while python313Packages.future does not evaluate and 4296 # until https://github.com/CZ-NIC/pyoidc/issues/649 is resolved
··· 4287 4288 rsibreak = libsForQt5.callPackage ../applications/misc/rsibreak { }; 4289 4290 rucio = callPackage ../by-name/ru/rucio/package.nix { 4291 # Pinned to python 3.12 while python313Packages.future does not evaluate and 4292 # until https://github.com/CZ-NIC/pyoidc/issues/649 is resolved