From 5930166b22e160b654908bcb711729fb61604c99 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 22 Mar 2021 18:50:31 +0100 Subject: [PATCH] python3Packages.chardet: 3.0.4 -> 4.0.0 --- .../python-modules/chardet/default.nix | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/chardet/default.nix b/pkgs/development/python-modules/chardet/default.nix index 65381d40268..7753d6ccfde 100644 --- a/pkgs/development/python-modules/chardet/default.nix +++ b/pkgs/development/python-modules/chardet/default.nix @@ -1,29 +1,32 @@ -{ lib, buildPythonPackage, fetchPypi, fetchpatch -, pytest, pytestrunner, hypothesis }: +{ lib +, buildPythonPackage +, fetchPypi +, hypothesis +, pythonOlder +, pytestCheckHook +}: buildPythonPackage rec { pname = "chardet"; - version = "3.0.4"; + version = "4.0.0"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"; + sha256 = "sha256-DW9ToV20Eg8rCMlPEefZPSyRHuEYtrMKBOw+6DEBefo="; }; - patches = [ - # Add pytest 4 support. See: https://github.com/chardet/chardet/pull/174 - (fetchpatch { - url = "https://github.com/chardet/chardet/commit/0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4.patch"; - sha256 = "1y1xhjf32rdhq9sfz58pghwv794f3w2f2qcn8p6hp4pc8jsdrn2q"; - }) + checkInputs = [ + hypothesis + pytestCheckHook ]; - checkInputs = [ pytest pytestrunner hypothesis ]; + pythonImportsCheck = [ "chardet" ]; meta = with lib; { - homepage = "https://github.com/chardet/chardet"; description = "Universal encoding detector"; - license = licenses.lgpl2; + homepage = "https://github.com/chardet/chardet"; + license = licenses.lgpl21Plus; maintainers = with maintainers; [ domenkozar ]; }; }