Merge pull request #297707 from wegank/rss2email-fix
rss2email: fix tests with html2text 2024.2.25
This commit is contained in:
commit
25390fdee7
|
@ -1,4 +1,9 @@
|
||||||
{ pythonPackages, fetchurl, lib, nixosTests }:
|
{ lib
|
||||||
|
, pythonPackages
|
||||||
|
, fetchPypi
|
||||||
|
, fetchpatch2
|
||||||
|
, nixosTests
|
||||||
|
}:
|
||||||
|
|
||||||
with pythonPackages;
|
with pythonPackages;
|
||||||
|
|
||||||
|
@ -9,11 +14,19 @@ buildPythonApplication rec {
|
||||||
propagatedBuildInputs = [ feedparser html2text ];
|
propagatedBuildInputs = [ feedparser html2text ];
|
||||||
nativeCheckInputs = [ beautifulsoup4 ];
|
nativeCheckInputs = [ beautifulsoup4 ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchPypi {
|
||||||
url = "mirror://pypi/r/rss2email/${pname}-${version}.tar.gz";
|
inherit pname version;
|
||||||
sha256 = "sha256-RwORS2PHquxBZLNKqCJtR5XX4SHqPCb/Fn+Y68dfI/g=";
|
hash = "sha256-RwORS2PHquxBZLNKqCJtR5XX4SHqPCb/Fn+Y68dfI/g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch2 {
|
||||||
|
name = "html2text-2024.2.25-compat.patch";
|
||||||
|
url = "https://github.com/rss2email/rss2email/commit/b5c0e78006c2db6929b5ff50e8529de58a00412a.patch";
|
||||||
|
hash = "sha256-edmsi3I0acx5iF9xoAS9deSexqW2UtWZR/L7CgeZs/M=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "man" "doc" ];
|
outputs = [ "out" "man" "doc" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -3,29 +3,36 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, setuptools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "html2text";
|
pname = "html2text";
|
||||||
version = "2024.2.26";
|
version = "2024.2.26";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
disabled = pythonOlder "3.5";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Alir3z4";
|
owner = "Alir3z4";
|
||||||
repo = pname;
|
repo = "html2text";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "sha256-1CLkTFR+/XQ428WjMF7wliyAG6CB+n8JSsLDdLHPO7I=";
|
sha256 = "sha256-1CLkTFR+/XQ428WjMF7wliyAG6CB+n8JSsLDdLHPO7I=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook ];
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "html2text" ];
|
pythonImportsCheck = [ "html2text" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
changelog = "https://github.com/Alir3z4/html2text/blob/${src.rev}/ChangeLog.rst";
|
||||||
description = "Turn HTML into equivalent Markdown-structured text";
|
description = "Turn HTML into equivalent Markdown-structured text";
|
||||||
mainProgram = "html2text";
|
|
||||||
homepage = "https://github.com/Alir3z4/html2text/";
|
homepage = "https://github.com/Alir3z4/html2text/";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
|
mainProgram = "html2text";
|
||||||
|
maintainers = [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user