mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
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;
|
||||
|
||||
@ -9,11 +14,19 @@ buildPythonApplication rec {
|
||||
propagatedBuildInputs = [ feedparser html2text ];
|
||||
nativeCheckInputs = [ beautifulsoup4 ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/r/rss2email/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-RwORS2PHquxBZLNKqCJtR5XX4SHqPCb/Fn+Y68dfI/g=";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
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" ];
|
||||
|
||||
postPatch = ''
|
||||
|
@ -3,29 +3,36 @@
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "html2text";
|
||||
version = "2024.2.26";
|
||||
format = "setuptools";
|
||||
disabled = pythonOlder "3.5";
|
||||
pyproject = true;
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Alir3z4";
|
||||
repo = pname;
|
||||
repo = "html2text";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-1CLkTFR+/XQ428WjMF7wliyAG6CB+n8JSsLDdLHPO7I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "html2text" ];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/Alir3z4/html2text/blob/${src.rev}/ChangeLog.rst";
|
||||
description = "Turn HTML into equivalent Markdown-structured text";
|
||||
mainProgram = "html2text";
|
||||
homepage = "https://github.com/Alir3z4/html2text/";
|
||||
license = licenses.gpl3Only;
|
||||
mainProgram = "html2text";
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user