about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/chardet/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/chardet/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/chardet/default.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/chardet/default.nix b/nixpkgs/pkgs/development/python-modules/chardet/default.nix
index 65381d40268f..7753d6ccfdeb 100644
--- a/nixpkgs/pkgs/development/python-modules/chardet/default.nix
+++ b/nixpkgs/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 ];
   };
 }