From 753ab3ce84bbd9e6e957be4c1fa5c70f9e2ff90f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 28 Oct 2019 22:30:21 -0700 Subject: [PATCH] python3Packages.html2text: fix build --- .../python-modules/html2text/default.nix | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/html2text/default.nix b/pkgs/development/python-modules/html2text/default.nix index 3659d3368be..9b289032514 100644 --- a/pkgs/development/python-modules/html2text/default.nix +++ b/pkgs/development/python-modules/html2text/default.nix @@ -1,21 +1,28 @@ -{ stdenv -, buildPythonPackage -, fetchPypi +{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder +, pytest }: buildPythonPackage rec { pname = "html2text"; version = "2019.9.26"; + disabled = pythonOlder "3.5"; - src = fetchPypi { - inherit pname version; - sha256 = "6f56057c5c2993b5cc5b347cb099bdf6d095828fef1b53ef4e2a2bf2a1be9b4f"; + src = fetchFromGitHub { + owner = "Alir3z4"; + repo = pname; + rev = version; + sha256 = "1gzcx4n6q71plq4zvb1z0fy3brrln0qqrd6jc89iiqn7r1ix8h87"; }; - meta = with stdenv.lib; { + # python setup.py test is broken, use pytest + checkInputs = [ pytest ]; + checkPhase = '' + pytest + ''; + + meta = with lib; { description = "Turn HTML into equivalent Markdown-structured text"; homepage = https://github.com/Alir3z4/html2text/; license = licenses.gpl3; }; - }