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