From 62b037c6eed007115f345411591d34524ffb7002 Mon Sep 17 00:00:00 2001
From: Fabian Affolter <mail@fabian-affolter.ch>
Date: Mon, 27 Sep 2021 22:52:49 +0200
Subject: [PATCH] python3Packages.karton-classifier: 1.1.0 -> 1.2.0

---
 .../karton-classifier/default.nix               | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/pkgs/development/python-modules/karton-classifier/default.nix b/pkgs/development/python-modules/karton-classifier/default.nix
index ea9710ecd311..ca2703389b30 100644
--- a/pkgs/development/python-modules/karton-classifier/default.nix
+++ b/pkgs/development/python-modules/karton-classifier/default.nix
@@ -3,19 +3,22 @@
 , chardet
 , fetchFromGitHub
 , karton-core
-, python
+, pytestCheckHook
 , python_magic
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "karton-classifier";
-  version = "1.1.0";
+  version = "1.2.0";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "CERT-Polska";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0s09mzsw546klnvm59wzj9vdwd2hyzgxvapi20k86q3prs9ncds6";
+    sha256 = "sha256-AG2CtNMgXYfbdlOqB1ZdjMT8H67fsSMXTgiFg6K41IQ=";
   };
 
   propagatedBuildInputs = [
@@ -30,11 +33,9 @@ buildPythonPackage rec {
       --replace "python-magic==0.4.18" "python-magic"
   '';
 
-  checkPhase = ''
-    runHook preCheck
-    ${python.interpreter} -m unittest discover
-    runHook postCheck
-  '';
+  checkInputs = [
+    pytestCheckHook
+  ];
 
   pythonImportsCheck = [ "karton.classifier" ];