11 buildPythonPackage rec {
12 pname = "karton-classifier";
14 format = "setuptools";
16 disabled = pythonOlder "3.7";
18 src = fetchFromGitHub {
19 owner = "CERT-Polska";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-DH8I4Lbbs2TVMvYlvh/P2I/7O4+VechP2JDDVHNsTSg=";
25 propagatedBuildInputs = [
36 substituteInPlace requirements.txt \
37 --replace "chardet==3.0.4" "chardet" \
38 --replace "python-magic==0.4.18" "python-magic"
41 pythonImportsCheck = [
46 # Tests expecting results from a different version of libmagic
47 "test_process_archive_ace"
48 "test_process_runnable_win32_lnk"
49 "test_process_misc_csv"
53 description = "File type classifier for the Karton framework";
54 mainProgram = "karton-classifier";
55 homepage = "https://github.com/CERT-Polska/karton-classifier";
56 changelog = "https://github.com/CERT-Polska/karton-classifier/releases/tag/v${version}";
57 license = with licenses; [ bsd3 ];
58 maintainers = with maintainers; [ fab ];