From 8fc1bd6ec352c8304fdbf0eba9ad420fe9e8e477 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Tue, 29 Oct 2019 02:59:32 +0000 Subject: [PATCH] pythonPackages.html2text: freeze at 2018.1.9 I was unable tp build calibre at the current git master as it relies on pytthon27Packages.html2text. Python 2.7 support was removed in the latest version. This PR downgrades html2text when using an unsupported Python version. This PR does not fix building python37Packages.html2text and python38Packages.html2text, which were broken at master due to what seems to be a problem in buildPythonPackage. --- .../python-modules/html2text/2018.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/html2text/2018.nix diff --git a/pkgs/development/python-modules/html2text/2018.nix b/pkgs/development/python-modules/html2text/2018.nix new file mode 100644 index 00000000000..cac88c55794 --- /dev/null +++ b/pkgs/development/python-modules/html2text/2018.nix @@ -0,0 +1,21 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "html2text"; + version = "2018.1.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "627514fb30e7566b37be6900df26c2c78a030cc9e6211bda604d8181233bcdd4"; + }; + + meta = with stdenv.lib; { + description = "Turn HTML into equivalent Markdown-structured text"; + homepage = https://github.com/Alir3z4/html2text/; + license = licenses.gpl3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f97de31c64d..d723bdb2b63 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5800,7 +5800,8 @@ in { termcolor = callPackage ../development/python-modules/termcolor { }; - html2text = callPackage ../development/python-modules/html2text { }; + html2text = if isPy3k then callPackage ../development/python-modules/html2text { } + else callPackage ../development/python-modules/html2text/2018.nix { }; pychart = callPackage ../development/python-modules/pychart {};