From 8f39ebbaf98abfa39880714278d95cfe4f6dffc0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 9 Aug 2022 22:55:41 +0200 Subject: [PATCH] python310Packages.karton-classifier: 1.3.0 -> 1.4.0 --- .../karton-classifier/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/karton-classifier/default.nix b/pkgs/development/python-modules/karton-classifier/default.nix index 8195632bdfd4..bcf4b075dfaf 100644 --- a/pkgs/development/python-modules/karton-classifier/default.nix +++ b/pkgs/development/python-modules/karton-classifier/default.nix @@ -10,7 +10,8 @@ buildPythonPackage rec { pname = "karton-classifier"; - version = "1.2.0"; + version = "1.4.0"; + format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +19,7 @@ buildPythonPackage rec { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "sha256-AG2CtNMgXYfbdlOqB1ZdjMT8H67fsSMXTgiFg6K41IQ="; + hash = "sha256-TRmAin0TAOIwR5EBMwTOJ9QaHO+mOx/eAjgqvyQZDj4="; }; propagatedBuildInputs = [ @@ -27,17 +28,25 @@ buildPythonPackage rec { python-magic ]; + checkInputs = [ + pytestCheckHook + ]; + postPatch = '' substituteInPlace requirements.txt \ --replace "chardet==3.0.4" "chardet" \ --replace "python-magic==0.4.18" "python-magic" ''; - checkInputs = [ - pytestCheckHook + pythonImportsCheck = [ + "karton.classifier" ]; - pythonImportsCheck = [ "karton.classifier" ]; + disabledTests = [ + # Tests expecting results from a different version of libmagic + "test_process_archive_ace" + "test_process_runnable_win32_lnk" + ]; meta = with lib; { description = "File type classifier for the Karton framework";