Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 59 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 chardet, 5 fetchFromGitHub, 6 setuptools, 7 karton-core, 8 pytestCheckHook, 9 python-magic, 10 pythonOlder, 11}: 12 13buildPythonPackage rec { 14 pname = "karton-classifier"; 15 version = "2.0.0"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "CERT-Polska"; 22 repo = "karton-classifier"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-DH8I4Lbbs2TVMvYlvh/P2I/7O4+VechP2JDDVHNsTSg="; 25 }; 26 27 pythonRelaxDeps = [ 28 "chardet" 29 "python-magic" 30 ]; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 chardet 36 karton-core 37 python-magic 38 ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 pythonImportsCheck = [ "karton.classifier" ]; 43 44 disabledTests = [ 45 # Tests expecting results from a different version of libmagic 46 "test_process_archive_ace" 47 "test_process_runnable_win32_lnk" 48 "test_process_misc_csv" 49 ]; 50 51 meta = with lib; { 52 description = "File type classifier for the Karton framework"; 53 mainProgram = "karton-classifier"; 54 homepage = "https://github.com/CERT-Polska/karton-classifier"; 55 changelog = "https://github.com/CERT-Polska/karton-classifier/releases/tag/v${version}"; 56 license = with licenses; [ bsd3 ]; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}